diff options
Diffstat (limited to 'engine/Builtin')
| -rw-r--r-- | engine/Builtin/MainMenu.go | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/engine/Builtin/MainMenu.go b/engine/Builtin/MainMenu.go new file mode 100644 index 0000000..aa5d283 --- /dev/null +++ b/engine/Builtin/MainMenu.go @@ -0,0 +1,51 @@ +package builtin + +import ( + _ "embed" + + dynamic "github.com/DegustatorPonos/RuinesOfRafdolon/Dynamic" + ui "github.com/DegustatorPonos/RuinesOfRafdolon/UI" +) + +const mainMenuLocation string = "../assets/MainMenu.json" + +var menuSidePanelPadding float32 = 0.01 + +// The menu that shows up +var MainMenuVar = ui.Menu { + PaddingX: 0.05, + PaddingY: 0.1, + Contents: &ui.GridRow { + Objects: []ui.UIElement { + &ui.Void{ + Weight: 2, + }, + &ui.GridColumn { + Weight: 1, + Spacing: 0.05, + Style: ui.Style { + Padding: &menuSidePanelPadding, + }, + Objects: []ui.UIElement { + &ui.Label { + Text: "Ruines of Rafdalon", + }, + &ui.Button { + DisplayElement: &ui.Label { + Text: "Load a demo scene", + }, + }, + &ui.Void{ + Weight: 4, + }, + }, + }, + }, + }, +} + +func MainMenu() *dynamic.DynamicMenu { + return &dynamic.DynamicMenu { + FileLocation: mainMenuLocation, + } +} |
