diff options
Diffstat (limited to 'engine/UI/GridRow.go')
| -rw-r--r-- | engine/UI/GridRow.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/engine/UI/GridRow.go b/engine/UI/GridRow.go new file mode 100644 index 0000000..bb9ffe3 --- /dev/null +++ b/engine/UI/GridRow.go @@ -0,0 +1,25 @@ +package ui + +import rl "github.com/gen2brain/raylib-go/raylib" + +type GridRow struct { + // A portion of the screen the row will occupy. Works similar to CSS's 'flex-grow' + HeightWeight float32 + // The objects that lay in this row + Objects []UIElement + + location rl.Rectangle +} + +func (base *GridRow) Init(parent *Menu) { + for _, v := range base.Objects { + v.Init(parent) + } +} + +func (base *GridRow) Draw(span rl.Rectangle) { + // TODO: Add horizontal spacing + for _, v := range base.Objects { + v.Draw(&span) + } +} |
