summaryrefslogtreecommitdiff
path: root/engine/Builtin/MainMenu.go
blob: aa5d28346de6c8b02cc80b49858a793bdcc21c56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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,
	}
}