hedgewars/uCommandHandlers.pas
changeset 14701 d74517fdb34f
parent 14700 4eaeba349179
child 14702 bd43e703608b
equal deleted inserted replaced
14700:4eaeba349179 14701:d74517fdb34f
   730 end;
   730 end;
   731 
   731 
   732 procedure chZoomIn(var s: shortstring);
   732 procedure chZoomIn(var s: shortstring);
   733 begin
   733 begin
   734     s:= s; // avoid compiler hint
   734     s:= s; // avoid compiler hint
   735     if ZoomValue < cMinZoomLevel then
   735     if (LocalMessage and gmPrecise <> 0) then
   736         if (LocalMessage and gmPrecise <> 0) then
   736         ZoomValue:= ZoomValue + cZoomDeltaSmall
   737             ZoomValue:= ZoomValue + cZoomDeltaSmall
   737     else
   738         else
   738         ZoomValue:= ZoomValue + cZoomDelta;
   739             ZoomValue:= ZoomValue + cZoomDelta;
   739     if ZoomValue > cMinZoomLevel then
       
   740         ZoomValue:= cMinZoomLevel;
   740 end;
   741 end;
   741 
   742 
   742 procedure chZoomOut(var s: shortstring);
   743 procedure chZoomOut(var s: shortstring);
   743 begin
   744 begin
   744     s:= s; // avoid compiler hint
   745     s:= s; // avoid compiler hint
   745     if ZoomValue > cMaxZoomLevel then
   746     if (LocalMessage and gmPrecise <> 0) then
   746         if (LocalMessage and gmPrecise <> 0) then
   747         ZoomValue:= ZoomValue - cZoomDeltaSmall
   747             ZoomValue:= ZoomValue - cZoomDeltaSmall
   748     else
   748         else
   749         ZoomValue:= ZoomValue - cZoomDelta;
   749             ZoomValue:= ZoomValue - cZoomDelta;
   750     if ZoomValue < cMaxZoomLevel then
       
   751         ZoomValue:= cMaxZoomLevel;
   750 end;
   752 end;
   751 
   753 
   752 procedure chZoomReset(var s: shortstring);
   754 procedure chZoomReset(var s: shortstring);
   753 begin
   755 begin
   754     s:= s; // avoid compiler hint
   756     s:= s; // avoid compiler hint