introduce enums as map keys
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
func (e *Engine) DialogUpdate() {
|
||||
dialog := e.Domain.GetDialog(e.KContext.ScreenValue)
|
||||
dialog := e.Domain.GetDialog(e.KContext.ActiveDialog)
|
||||
|
||||
if e.UpPressed() && dialog.CurrentSelected != 0 {
|
||||
dialog.CurrentSelected--
|
||||
@@ -19,11 +19,11 @@ func (e *Engine) DialogUpdate() {
|
||||
if e.Action0Pressed() {
|
||||
dialog.Choices[dialog.CurrentSelected].Handler()
|
||||
}
|
||||
e.Domain.SetDialog(e.KContext.ScreenValue, dialog)
|
||||
e.Domain.SetDialog(e.KContext.ActiveDialog, dialog)
|
||||
}
|
||||
|
||||
func (e *Engine) DialogDraw(screen *ebiten.Image) {
|
||||
dialog := e.Domain.GetDialog(e.KContext.ScreenValue)
|
||||
dialog := e.Domain.GetDialog(e.KContext.ActiveDialog)
|
||||
|
||||
face := dialog.Layout.ChoiceFont.GetFontFace()
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
func (e *Engine) MenuUpdate() {
|
||||
menu := e.Domain.GetMenu(e.KContext.ScreenValue)
|
||||
menu := e.Domain.GetMenu(e.KContext.ActiveMenu)
|
||||
|
||||
if e.UpPressed() && menu.CurrentSelected != 0 {
|
||||
menu.CurrentSelected--
|
||||
@@ -20,11 +20,11 @@ func (e *Engine) MenuUpdate() {
|
||||
menu.MenuItems[menu.CurrentSelected].Handler()
|
||||
}
|
||||
|
||||
e.Domain.SetMenu(e.KContext.ScreenValue, menu)
|
||||
e.Domain.SetMenu(e.KContext.ActiveMenu, menu)
|
||||
}
|
||||
|
||||
func (e *Engine) MenuDraw(screen *ebiten.Image) {
|
||||
menu := e.Domain.GetMenu(e.KContext.ScreenValue)
|
||||
menu := e.Domain.GetMenu(e.KContext.ActiveMenu)
|
||||
face := menu.Layout.MenuItemFont.GetFontFace()
|
||||
|
||||
for i, menu_item := range menu.MenuItems {
|
||||
|
||||
Reference in New Issue
Block a user