diff options
| author | physcik <mynameisgennadiy@vk.com> | 2026-03-27 15:38:35 +0500 |
|---|---|---|
| committer | physcik <mynameisgennadiy@vk.com> | 2026-03-27 15:38:35 +0500 |
| commit | 34e63154d2c683c6f30b3d0d524b1e11331ea27e (patch) | |
| tree | 9350305338c115e81ad51c00fc1c83b62ffccda5 /engine/UI/GridColumn.go | |
| parent | 6f1a05cfa4d9323b55dc4da3221d10c58c2327d4 (diff) | |
Added background elements to grid row and column
Diffstat (limited to 'engine/UI/GridColumn.go')
| -rw-r--r-- | engine/UI/GridColumn.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/engine/UI/GridColumn.go b/engine/UI/GridColumn.go index 46c12ad..42c1eed 100644 --- a/engine/UI/GridColumn.go +++ b/engine/UI/GridColumn.go @@ -13,6 +13,7 @@ type GridColumn struct { Spacing float32 // Styling preferences Style Style `json:"-"` + BackgroundElement UIElement location rl.Rectangle cache layoutCache @@ -26,6 +27,18 @@ func (base *GridColumn) Init(parent *Menu) { base.cache = layoutCache { ScreenResolution: rl.Vector2{ X:0, Y:0 }, } + + if base.BackgroundElement != nil { + base.BackgroundElement.Init(parent) + } +} + +func (base *GridColumn) GetStyle() *Style { + return &base.Style +} + +func (base *GridColumn) GetBackgroundElement() UIElement { + return base.BackgroundElement } func (base *GridColumn) Destroy() { @@ -41,6 +54,7 @@ func (base *GridColumn) Draw(span *rl.Rectangle) { if !base.cache.IsValid() { base.RecalculateCache(span) } + drawStackedElementBackground(base, span) for i, v := range base.Objects { var offset = base.cache.RowLocations[i] // rl.TraceLog(rl.LogInfo, "Cache: %v", base.cache) |
