From db469da2704f703d15e81f5e44ba157c10a21e77 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sat, 25 Feb 2023 23:08:47 +0100 Subject: 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 --- go/ui/button.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'go/ui') 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() + } } -- cgit v1.2.3