Noah Petherbridge
2b42a072a0
* All private Doodle source code into the pkg/ folder. * Potentially public code into the lib/ folder. * Centralize the logger into a subpackage.
20 lines
368 B
Go
20 lines
368 B
Go
package uix
|
|
|
|
// Tool is a draw mode for an editable Canvas.
|
|
type Tool int
|
|
|
|
// Draw modes for editable Canvas.
|
|
const (
|
|
PencilTool Tool = iota // draw pixels where the mouse clicks
|
|
ActorTool // drag and move actors
|
|
)
|
|
|
|
var toolNames = []string{
|
|
"Pencil",
|
|
"Doodad", // readable name for ActorTool
|
|
}
|
|
|
|
func (t Tool) String() string {
|
|
return toolNames[t]
|
|
}
|