move menu and playground to konstructor

This commit is contained in:
2023-07-01 02:54:03 +02:00
parent 884df7c406
commit 4750437aff
7 changed files with 88 additions and 72 deletions

View File

@@ -10,6 +10,7 @@ type ContextInterface interface {
}
type DomainInterface interface {
GetMenuMap() MenuMap
Init()
}

18
konstructor/menu.go Executable file
View File

@@ -0,0 +1,18 @@
package konstructor
type MenuMap map[string]Menu
type MenuLayout struct {
Background string
}
type MenuItem struct {
ID string
Label string
Handler func()
}
type Menu struct {
MenuLayout MenuLayout
MenuItems []MenuItem
}

12
konstructor/playground.go Executable file
View File

@@ -0,0 +1,12 @@
package konstructor
type PlaygroundObject struct {
Image string
PosX int
PosY int
}
type Playground struct {
Background string
Objects []PlaygroundObject
}