-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathglobals.go
96 lines (81 loc) · 2.32 KB
/
globals.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
package main
import (
"context"
"net/http"
"github.com/blang/semver"
"github.com/cavaliergopher/grab/v3"
"github.com/faiface/beep"
"github.com/veandco/go-sdl2/sdl"
"github.com/veandco/go-sdl2/ttf"
)
const (
StateNeutral = "project state neutral"
StateTextEditing = "project state text editing"
StateMapEditing = "project state map editing"
StateContextMenu = "project state context menu open"
StateCardArrow = "project state card arrow"
StateCardLink = "project state card linking"
StateExport = "project state export"
)
const (
ReleaseModeRelease = "release"
ReleaseModeDemo = "demo"
ReleaseModeDev = "dev"
)
type Globals struct {
Project *Project
NextProject *Project
Window *sdl.Window
WindowTransparency float64
WindowTargetTransparency float64
GUITexture Image
Renderer *sdl.Renderer
ScreenshotTexture *sdl.Texture
ScreenshotSurf *sdl.Surface
ExportSurf *sdl.Surface
RendererInfo sdl.RendererInfo
Font *ttf.Font
TextRenderer *TextRenderer
LoadedFontPath string
Keyboard Keyboard
Mouse Mouse
InputText []rune
Time float64
DeltaTime float32
Frame int64
GridSize float32
ScreenSize Point
ScreenSizePrev Point
ScreenSizeChanged bool
CopyBuffer *CopyBuffer
Version semver.Version
State string
Resources ResourceBank
GrabClient *grab.Client
MenuSystem *MenuSystem
EventLog *EventLog
WindowFlags uint32
ReleaseMode string
Settings *Properties
SettingsLoaded bool
ChosenAudioSampleRate beep.SampleRate
ChosenAudioBufferSize int
SpeakerInitialized bool
Keybindings *Keybindings
RecentFiles []string
HTTPClient *http.Client
DebugMode bool
TriggerReloadFonts bool
ClipRects []*sdl.Rect
Dispatcher *Dispatcher
Hierarchy *Hierarchy
editingLabel *Label
editingCard *Card
textEditingWrap *Property
DrawOnTop DrawOnTop
BrowserContext context.Context
}
var globals = &Globals{
ReleaseMode: ReleaseModeDev,
ClipRects: []*sdl.Rect{},
}