hedgewars/uWorld.pas
changeset 14542 e68b91abbcf5
parent 14541 42f7ce0f5bc6
child 14544 3105881d5840
equal deleted inserted replaced
14541:42f7ce0f5bc6 14542:e68b91abbcf5
  2146 
  2146 
  2147 if(CurrentHedgehog <> nil)then
  2147 if(CurrentHedgehog <> nil)then
  2148     if ((Ammoz[ammoType].Ammo.Propz and ammoprop_Timerable) <> 0) and (ammoType <> amDrillStrike) then
  2148     if ((Ammoz[ammoType].Ammo.Propz and ammoprop_Timerable) <> 0) and (ammoType <> amDrillStrike) then
  2149         begin
  2149         begin
  2150         utilityWidget.sprite:= sprTimerButton;
  2150         utilityWidget.sprite:= sprTimerButton;
  2151         animateWidget(@utilityWidget, true, true);
  2151         if (not utilityWidget.show) then
       
  2152             animateWidget(@utilityWidget, true, true);
  2152         end
  2153         end
  2153     else if (Ammoz[ammoType].Ammo.Propz and ammoprop_NeedTarget) <> 0 then
  2154     else if (Ammoz[ammoType].Ammo.Propz and ammoprop_NeedTarget) <> 0 then
  2154         begin
  2155         begin
  2155         utilityWidget.sprite:= sprTargetButton;
  2156         utilityWidget.sprite:= sprTargetButton;
  2156         animateWidget(@utilityWidget, true, true);
  2157         if (not utilityWidget.show) then
       
  2158             animateWidget(@utilityWidget, true, true);
  2157         end
  2159         end
  2158     else if ammoType = amSwitch then
  2160     else if ammoType = amSwitch then
  2159         begin
  2161         begin
  2160         utilityWidget.sprite:= sprSwitchButton;
  2162         utilityWidget.sprite:= sprSwitchButton;
  2161         animateWidget(@utilityWidget, true, true);
  2163         if (not utilityWidget.show) then
       
  2164             animateWidget(@utilityWidget, true, true);
  2162         end
  2165         end
  2163     else if utilityWidget.show then
  2166     else if utilityWidget.show then
  2164         animateWidget(@utilityWidget, true, false);
  2167         animateWidget(@utilityWidget, true, false);
  2165 
  2168 
  2166     if ((Ammoz[ammoType].Ammo.Propz and ammoprop_SetBounce) <> 0) then
  2169     if ((Ammoz[ammoType].Ammo.Propz and ammoprop_SetBounce) <> 0) then
  2167         begin
  2170         begin
  2168         utilityWidget2.sprite:= sprBounceButton;
  2171         utilityWidget2.sprite:= sprBounceButton;
  2169         animateWidget(@utilityWidget2, true, true);
  2172         if (not utilityWidget2.show) then
       
  2173             animateWidget(@utilityWidget2, true, true);
  2170         end
  2174         end
  2171     else if utilityWidget2.show then
  2175     else if utilityWidget2.show then
  2172         animateWidget(@utilityWidget2, true, false);
  2176         animateWidget(@utilityWidget2, true, false);
  2173 {$ELSE}
  2177 {$ELSE}
  2174 ammoType:= ammoType; // avoid hint
  2178 ammoType:= ammoType; // avoid hint