fixed clear screen problem, menus are now shown correctly. lots new

bugs though
This commit is contained in:
2024-06-01 20:22:28 +02:00
committed by T.v.Dein
parent 9f1bdfd2af
commit 689b7be08b
10 changed files with 115 additions and 83 deletions

View File

@@ -46,14 +46,11 @@ func (scene *SceneMenu) SetNext(next SceneName) {
scene.Next = next
}
func (scene *SceneMenu) Clearscreen() bool {
return false
}
func (scene *SceneMenu) Update() error {
scene.Ui.Update()
if inpututil.IsKeyJustPressed(ebiten.KeyEscape) || inpututil.IsKeyJustPressed(ebiten.KeyQ) {
scene.Config.DelayedStart = false
scene.Leave()
}
@@ -61,6 +58,10 @@ func (scene *SceneMenu) Update() error {
}
func (scene *SceneMenu) IsPrimary() bool {
return false
}
func (scene *SceneMenu) Draw(screen *ebiten.Image) {
scene.Ui.Draw(screen)
}
@@ -102,7 +103,7 @@ func (scene *SceneMenu) Init() {
separator2 := NewSeparator()
separator3 := NewSeparator()
cancel := NewMenuButton("Close Window",
cancel := NewMenuButton("Back",
func(args *widget.ButtonClickedEventArgs) {
scene.Leave()
})