entity layer

This commit is contained in:
2023-07-04 22:58:23 +02:00
parent 93b2725c8a
commit e9c35f01ab
19 changed files with 364 additions and 353 deletions

View File

@@ -0,0 +1,30 @@
package entity
import "image/color"
type DialogMap map[string]Dialog
type DialogLayout struct {
Background string
ChoiceFont FontLayout
}
type DialogChoice struct {
ID string
Label string
Handler func()
}
type Dialog struct {
CurrentSelected int
Layout DialogLayout
Choices []DialogChoice
}
func (dialog *Dialog) GetChoiceColor(i int) color.Color {
if dialog.CurrentSelected == i {
return dialog.Layout.ChoiceFont.SelectedColor
} else {
return dialog.Layout.ChoiceFont.Color
}
}