summaryrefslogtreecommitdiff
path: root/engine/UI/Button.go
diff options
context:
space:
mode:
Diffstat (limited to 'engine/UI/Button.go')
-rw-r--r--engine/UI/Button.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/engine/UI/Button.go b/engine/UI/Button.go
index f865c5f..8990fb7 100644
--- a/engine/UI/Button.go
+++ b/engine/UI/Button.go
@@ -12,7 +12,7 @@ const (
)
type Button struct {
- WidthWeight float32
+ Weight float32
DisplayElement UIElement
EventType DetectionType
ButtonType rl.MouseButton
@@ -23,8 +23,8 @@ type Button struct {
func (base *Button) Init(parent *Menu) {
base.DisplayElement.Init(parent)
- if base.WidthWeight == 0 {
- base.WidthWeight = 1
+ if base.Weight == 0 {
+ base.Weight = 1
}
switch base.EventType {
@@ -39,7 +39,7 @@ func (base *Button) Destroy() {
}
func (base *Button) GetOccupationWeight() float32 {
- return base.WidthWeight
+ return base.Weight
}
func (base *Button) Draw(position *rl.Rectangle) {