diff options
Diffstat (limited to 'engine/main.go')
| -rw-r--r-- | engine/main.go | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/engine/main.go b/engine/main.go index 9a8030a..de8ff34 100644 --- a/engine/main.go +++ b/engine/main.go @@ -38,41 +38,45 @@ func main() { } func menu_test() *ui.Menu { - return &ui.Menu{ + return &ui.Menu { PaddingX: 0.05, PaddingY: 0.1, - Spacing: 0.025, - Rows: []ui.UIElement { - &ui.GridRow { - HeightWeight: 1, - Spacing: 0.01, - Objects: []ui.UIElement { - &ui.Label{ Text: "First piece" }, - &ui.Label{ Text: "Wide piece", WidthWeight: 2 }, - &ui.Label{ Text: "Another piece" }, + Contents: &ui.GridColumn{ + Spacing: 0.025, + Objects: []ui.UIElement { + &ui.GridRow { + HeightWeight: 1, + Spacing: 0.01, + Objects: []ui.UIElement { + &ui.Label{ Text: "First piece" }, + &ui.Label{ Text: "Wide piece", WidthWeight: 2 }, + &ui.Label{ Text: "Another piece" }, + }, }, - }, - &ui.GridRow { - HeightWeight: 2, - Objects: []ui.UIElement { - &ui.Button { - EventType: ui.OnClick, - DisplayElement: &ui.Label { - Text: "Center button", - Alignment: ui.Center, - Style: ui.Style { - BacgroundColor: &rl.Pink, + &ui.GridRow { + HeightWeight: 2, + Objects: []ui.UIElement { + &ui.Button { + EventType: ui.OnClick, + DisplayElement: &ui.Label { + Text: "Center button", + Alignment: ui.Center, + Style: ui.Style { + BacgroundColor: &rl.Pink, + }, }, }, }, }, - }, - &ui.GridRow { - HeightWeight: 1, - Objects: []ui.UIElement { - &ui.Label{ Text: "A very very long text that is bigger than a window" }, + &ui.GridRow { + HeightWeight: 1, + Objects: []ui.UIElement { + &ui.Label{ Text: "A very very long text that is bigger than a window" }, + }, }, }, }, + // Rows: []ui.UIElement { + // }, } } |
