blooblib/gui/gui.go

26 lines
301 B
Go
Raw Normal View History

2024-03-24 01:14:26 +01:00
package gui
import . "git.danitheskunk.com/squishy/blooblib"
type gui struct {
2024-03-25 01:55:14 +01:00
Root Widget
2024-03-24 01:14:26 +01:00
}
var Gui gui
func InitGui(size Vec2i) {
Gui = gui{}
}
func DrawGui(target *Image) {
2024-03-25 01:55:14 +01:00
if Gui.Root != nil {
Gui.Root.Draw(target)
}
}
2024-03-24 01:14:26 +01:00
2024-03-25 01:55:14 +01:00
func UpdateGui() {
if Gui.Root != nil {
Gui.Root.Layout()
}
2024-03-24 01:14:26 +01:00
}