diff options
| author | Physcik <mynameisgennadiy@vk.com> | 2026-02-08 18:21:49 +0500 |
|---|---|---|
| committer | Physcik <mynameisgennadiy@vk.com> | 2026-02-08 18:21:49 +0500 |
| commit | 0e947ceb12bb2abf387b7acbab844eb842adcc7e (patch) | |
| tree | b99003fb7546195822876a40b6981894d0dded11 | |
| parent | 64f718a1cd694be0952fd3700636d81ba05d30f0 (diff) | |
Menu v1
| -rw-r--r-- | assets/MainMenu.json | 32 | ||||
| -rw-r--r-- | engine/Builtin/MainMenu.go | 38 |
2 files changed, 19 insertions, 51 deletions
diff --git a/assets/MainMenu.json b/assets/MainMenu.json index 69d3a4e..09e333b 100644 --- a/assets/MainMenu.json +++ b/assets/MainMenu.json @@ -2,23 +2,29 @@ "PaddingX": 0.05, "PaddingY": 0.1, "Contents": { - "Type": "gridcolumn", - "Weight": 2, + "Type": "gridrow", "Children": [ { - "Type": "label", - "Text": "xdd", - "Style": { - "Padding": 0, - "BackgroundColor": "#FFAAFF" - } + "Type": "void", + "Weight": 3 }, { - "Type": "void", - "Text": "xdd", - "Style": { - "Padding": 0 - } + "Type": "gridcolumn", + "Weight": 1, + "Children": [ + { + "Type": "label", + "Text": "Ruines of Rafdalon" + }, + { + "Type": "label", + "Text": "Load a demo scene" + }, + { + "Type": "void", + "Weight": 3 + } + ] } ] } diff --git a/engine/Builtin/MainMenu.go b/engine/Builtin/MainMenu.go index aa5d283..35eabea 100644 --- a/engine/Builtin/MainMenu.go +++ b/engine/Builtin/MainMenu.go @@ -1,49 +1,11 @@ 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, |
