diff options
Diffstat (limited to 'engine/UI/Menu.go')
| -rw-r--r-- | engine/UI/Menu.go | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/engine/UI/Menu.go b/engine/UI/Menu.go index c376839..e046a0e 100644 --- a/engine/UI/Menu.go +++ b/engine/UI/Menu.go @@ -60,6 +60,10 @@ func (base *Menu) Create(manager *coreobjects.SceneManager) { base.manager = manager base.cache = &layoutCache{} base.generateLayout() + + for _, v := range base.Rows { + v.Init(base) + } } func (base *Menu) Destroy() { @@ -145,21 +149,3 @@ func (base *Menu) getWeightToPixelRatio() float32 { func (base *Menu) GetMousePosition() rl.Vector2 { return rl.GetMousePosition() } - -type GridRow struct { - // A portion of the screen the row will occupy - HeightWeight float32 - // The objects that lay in this row - Objects []UIElement - - location rl.Rectangle -} - -func (base *GridRow) Draw(span rl.Rectangle) { - // TODO: Add horizontal spacing - for _, v := range base.Objects { - v.Draw(&span) - } -} - - |
