From 08242fe7c284d8e02c662d65831a08a6482e87a3 Mon Sep 17 00:00:00 2001 From: Physcik Date: Fri, 6 Feb 2026 17:51:23 +0500 Subject: Small naming refactor + void weight fix --- engine/UI/Label.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engine/UI/Label.go') diff --git a/engine/UI/Label.go b/engine/UI/Label.go index 53c6e96..8f60f10 100644 --- a/engine/UI/Label.go +++ b/engine/UI/Label.go @@ -32,7 +32,7 @@ const ( // A UI element containing a text field type Label struct { - WidthWeight float32 + Weight float32 Text string Alignment TextAlignment @@ -41,8 +41,8 @@ type Label struct { func (base *Label) Init(*Menu) { base.Style.FillMissing(defaultLabelStyle) - if base.WidthWeight == 0 { - base.WidthWeight = 1 + if base.Weight == 0 { + base.Weight = 1 } } @@ -68,7 +68,7 @@ func (base *Label) Draw(position *rl.Rectangle) { } func (base *Label) GetOccupationWeight() float32 { - return base.WidthWeight + return base.Weight } // Returns the size of the text that will not overflow in the side -- cgit v1.3