From d499f34a872398ab780ae410053993232fd4014b Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Wed, 3 Jul 2019 20:24:04 -0700 Subject: [PATCH] Add Tool Bar to Editor Mode * Toolbar has icon buttons for the Pencil Tool, Line Tool, Rect Tool, Actor Tool and Link Tool. * Remove the tab buttons from the top of the Palette window. The palette tab is now toggled between Swatches and Doodads by the tool selected on the tool bar, instead of the tab buttons setting the tool. * Remove the "Link Doodads" button from the Doodad Palette. The Link Tool has its own dedicated toolbar button with the others. --- image.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/image.go b/image.go index 8530f51..c6ef2b0 100644 --- a/image.go +++ b/image.go @@ -41,6 +41,13 @@ func NewImage(c Image) *Image { return w } +// ImageFromTexture creates an Image from a texture. +func ImageFromTexture(tex render.Texturer) *Image { + return &Image{ + texture: tex, + } +} + // OpenImage initializes an Image with a given file name. // // The file extension is important and should be a supported ImageType.