26 lines
301 B
Go
26 lines
301 B
Go
package gui
|
|
|
|
import . "git.danitheskunk.com/squishy/blooblib"
|
|
|
|
type gui struct {
|
|
Root Widget
|
|
}
|
|
|
|
var Gui gui
|
|
|
|
func InitGui(size Vec2i) {
|
|
Gui = gui{}
|
|
}
|
|
|
|
func DrawGui(target *Image) {
|
|
if Gui.Root != nil {
|
|
Gui.Root.Draw(target)
|
|
}
|
|
}
|
|
|
|
func UpdateGui() {
|
|
if Gui.Root != nil {
|
|
Gui.Root.Layout()
|
|
}
|
|
}
|