added workaround for clearscreen problem, fixed grid line option

This commit is contained in:
2024-05-31 14:19:30 +02:00
parent 73be8b93f4
commit 320c666af9
7 changed files with 90 additions and 39 deletions

View File

@@ -62,6 +62,12 @@ func (scene *SceneMenu) Update() error {
}
func (scene *SceneMenu) Draw(screen *ebiten.Image) {
op := &ebiten.DrawImageOptions{}
op.GeoM.Reset()
op.GeoM.Translate(0, 0)
screen.DrawImage(scene.Game.Screen, op)
scene.Ui.Draw(screen)
}
@@ -95,13 +101,14 @@ func (scene *SceneMenu) Init() {
separator1 := NewSeparator()
separator2 := NewSeparator()
separator3 := NewSeparator()
cancel := NewMenuButton("Close",
cancel := NewMenuButton("Close Window",
func(args *widget.ButtonClickedEventArgs) {
scene.SetNext(Play)
})
quit := NewMenuButton("Quit",
quit := NewMenuButton("Exit Golsky",
func(args *widget.ButtonClickedEventArgs) {
os.Exit(0)
})
@@ -113,6 +120,7 @@ func (scene *SceneMenu) Init() {
rowContainer.AddChild(copy)
rowContainer.AddChild(separator2)
rowContainer.AddChild(cancel)
rowContainer.AddChild(separator3)
rowContainer.AddChild(quit)
scene.Ui = &ebitenui.UI{