aboutsummaryrefslogtreecommitdiff
path: root/go/ui
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-02-25 23:08:47 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2025-01-27 16:43:52 +0100
commitdb469da2704f703d15e81f5e44ba157c10a21e77 (patch)
tree2f5b21600ed07b900b141aa910a9b2d6a1dfd4a3 /go/ui
parent7f271376d192b95e072750411970768782e75a63 (diff)
downloadmuhqs-game-db469da2704f703d15e81f5e44ba157c10a21e77.tar.gz
muhqs-game-db469da2704f703d15e81f5e44ba157c10a21e77.zip
intermediate commit
* Implement move artifact action * Fix widget update memory leak * update the highlights not during on each frame * do not update the unchanged label of a button * Allow to exit the game by pressing 'q' * Implement some cards from the magic set * Improve permanent formatting * Some tweaks to UnitAI code
Diffstat (limited to 'go/ui')
-rw-r--r--go/ui/button.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/go/ui/button.go b/go/ui/button.go
index 50f78a3d..e882d39c 100644
--- a/go/ui/button.go
+++ b/go/ui/button.go
@@ -46,6 +46,8 @@ func (b *SimpleButton) Click(x, y int) {
}
func (b *SimpleButton) UpdateLabel(label string) {
- b.label = label
- b.ForceRedraw()
+ if b.label != label {
+ b.label = label
+ b.ForceRedraw()
+ }
}