summaryrefslogtreecommitdiff
path: root/engine/UI/GridRow.go
diff options
context:
space:
mode:
authorPhyscik <mynameisgennadiy@vk.com>2026-01-30 03:04:43 +0500
committerPhyscik <mynameisgennadiy@vk.com>2026-01-30 03:04:43 +0500
commit95b7170acdfa73c5842db002ec64f78125fe2f90 (patch)
treebcf1255a4133e53888faf48d04a6cf1740441178 /engine/UI/GridRow.go
parent45b7d0ce612921729d925a7111e4d1aeba3ef849 (diff)
Text formation
Diffstat (limited to 'engine/UI/GridRow.go')
-rw-r--r--engine/UI/GridRow.go25
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)
+ }
+}