ColouringApp/vars.go

85 lines
1.6 KiB
Go
Raw Normal View History

2024-01-29 12:27:28 +00:00
package main
import raylib "github.com/gen2brain/raylib-go/raylib"
2024-02-09 17:03:32 +00:00
const Version = "0.1.0"
2024-01-29 12:27:28 +00:00
const (
applicationTitle = "Colouring App"
applicationMinWindowWidth = int32(800)
applicationMinWindowHeight = int32(600)
defaultProjectName = "NewProject"
defaultProjectWidth = 700
defaultProjectHeight = 530
dirAssets = "assets"
dirUserData = "userData"
)
const (
StateNormal = iota
StateDrawing
StateFileMenu
StateNewCanvas
2024-02-09 17:03:32 +00:00
StateHelp
StateFileExists
2024-01-29 12:27:28 +00:00
StateWindowWantsToDie
)
2024-02-09 14:16:18 +00:00
const (
2024-02-09 17:03:32 +00:00
toolPointer = iota
2024-02-09 14:16:18 +00:00
toolPen
)
2024-01-29 12:27:28 +00:00
var (
applicationState = StateNormal
applicationShouldQuit = false
applicationShowDebugValues = false
applicationWindowWidth = applicationMinWindowWidth
applicationWindowHeight = applicationMinWindowHeight
2024-02-09 14:16:18 +00:00
applicationRuntime = float32(0)
2024-01-29 12:27:28 +00:00
)
var (
2024-02-09 17:03:32 +00:00
newStrokeType = toolPen
2024-02-09 14:16:18 +00:00
newPenStroke = penTool{}
newStrokeSafeZone = 1
2024-02-09 17:03:32 +00:00
)
2024-01-29 12:27:28 +00:00
2024-02-09 17:03:32 +00:00
var (
toolBarWidth = int32(45)
toolBarOffset = applicationWindowWidth - toolBarWidth
toolBarShowPanel = true
)
var (
toolPanelWidth = int32(350)
toolPanelOffset = applicationWindowWidth - toolPanelWidth - toolBarWidth
2024-01-29 12:27:28 +00:00
toolPanelColourPicker = raylib.Orange
toolPanelColourPickerHeight = float32(250)
toolPanelBrushSize = float32(10)
isEditingCanvasName = false
)
var (
canvas *Canvas
shouldCreateNewCanvas = true
newCanvasName = defaultProjectName
isEditingNewCanvasName = false
newCanvasWidth = defaultProjectWidth
isEditingNewCanvasWidth = false
newCanvasHeight = defaultProjectHeight
isEditingNewCanvasHeight = false
newCanvasColor = raylib.White
newCanvasImagePath = ""
)