konstructor file prefixes refactor

This commit is contained in:
2023-07-07 01:07:50 +02:00
parent faa6f00891
commit 8d2fcabc4b
14 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
package konstructor
import "image/color"
type MenuMapKey string
type MenuMap map[MenuMapKey]Menu
type MenuLayout struct {
MenuItemFont FontLayout
}
type MenuItem struct {
ID string
Label string
Handler func()
}
type Menu struct {
CurrentSelected int
Layout MenuLayout
MenuItems []MenuItem
}
func (menu *Menu) GetMenuItemColor(i int) color.Color {
if menu.CurrentSelected == i {
return menu.Layout.MenuItemFont.SelectedColor
} else {
return menu.Layout.MenuItemFont.Color
}
}