# HG changeset patch
# User Wuzzy <Wuzzy2@mail.ru>
# Date 1547142304 -3600
# Node ID e68b91abbcf584ddbf56a6f6065f7a91deb754b2
# Parent  42f7ce0f5bc69a62abf5a6b9daaf0c08f6713c9d
Tweak appear/disappear animation of touch widgets

diff -r 42f7ce0f5bc6 -r e68b91abbcf5 hedgewars/uWorld.pas
--- a/hedgewars/uWorld.pas	Thu Jan 10 18:30:14 2019 +0100
+++ b/hedgewars/uWorld.pas	Thu Jan 10 18:45:04 2019 +0100
@@ -2148,17 +2148,20 @@
     if ((Ammoz[ammoType].Ammo.Propz and ammoprop_Timerable) <> 0) and (ammoType <> amDrillStrike) then
         begin
         utilityWidget.sprite:= sprTimerButton;
-        animateWidget(@utilityWidget, true, true);
+        if (not utilityWidget.show) then
+            animateWidget(@utilityWidget, true, true);
         end
     else if (Ammoz[ammoType].Ammo.Propz and ammoprop_NeedTarget) <> 0 then
         begin
         utilityWidget.sprite:= sprTargetButton;
-        animateWidget(@utilityWidget, true, true);
+        if (not utilityWidget.show) then
+            animateWidget(@utilityWidget, true, true);
         end
     else if ammoType = amSwitch then
         begin
         utilityWidget.sprite:= sprSwitchButton;
-        animateWidget(@utilityWidget, true, true);
+        if (not utilityWidget.show) then
+            animateWidget(@utilityWidget, true, true);
         end
     else if utilityWidget.show then
         animateWidget(@utilityWidget, true, false);
@@ -2166,7 +2169,8 @@
     if ((Ammoz[ammoType].Ammo.Propz and ammoprop_SetBounce) <> 0) then
         begin
         utilityWidget2.sprite:= sprBounceButton;
-        animateWidget(@utilityWidget2, true, true);
+        if (not utilityWidget2.show) then
+            animateWidget(@utilityWidget2, true, true);
         end
     else if utilityWidget2.show then
         animateWidget(@utilityWidget2, true, false);