# HG changeset patch # User Wuzzy # Date 1549331201 -3600 # Node ID 4eaeba3491799fb063ed4cd3f249c99514bdad99 # Parent c96889bf5796d30821063a5ac4c03e96abc980e4 Precise+zoom/volume change makes changes in smaller steps diff -r c96889bf5796 -r 4eaeba349179 ChangeLog.txt --- a/ChangeLog.txt Tue Feb 05 02:18:13 2019 +0100 +++ b/ChangeLog.txt Tue Feb 05 02:46:41 2019 +0100 @@ -46,6 +46,10 @@ Controls: + Add control to unselect current weapon (no key chosen by default) + Allow to leave a control unused + + Reset zoom resets zoom to zoom level set in options + + Precise + Reset zoom resets zoom to 100% (instead of zoom in options) + + Precise + zoom in/out changes zoom in smaller steps + + Precise + volume up/down changes volume in smaller steps + New chat command: “/help room” (shows room chat commands within the game) Graphics: diff -r c96889bf5796 -r 4eaeba349179 README.md --- a/README.md Tue Feb 05 02:18:13 2019 +0100 +++ b/README.md Tue Feb 05 02:46:41 2019 +0100 @@ -100,6 +100,8 @@ * Switch + Toggle hedgehog tags: Toggle hedgehog tag translucency * Precise + Toggle team bars + Switch: Toggle HUD * Precise + Capture (screenshot key): Save current map + mask into Screenshot directory +* Precise + zoom in/out: Change zoom in smaller steps +* Precise + volume up/down: Change volume in smaller steps * Precise + Reset zoom: Set zoom to 100% (instead of the zoom level in the settings) System requirements diff -r c96889bf5796 -r 4eaeba349179 hedgewars/uCommandHandlers.pas --- a/hedgewars/uCommandHandlers.pas Tue Feb 05 02:18:13 2019 +0100 +++ b/hedgewars/uCommandHandlers.pas Tue Feb 05 02:46:41 2019 +0100 @@ -285,6 +285,10 @@ with CurrentHedgehog^.Gear^ do Message:= Message or (gmPrecise and InputMask); ScriptCall('onPrecise'); +if cVolumeDelta > 0 then + cVolumeDelta:= 1; +if cVolumeDelta < 0 then + cVolumeDelta:= -1; end; procedure chPrecise_m(var s: shortstring); @@ -297,6 +301,10 @@ with CurrentHedgehog^.Gear^ do Message:= Message and (not (gmPrecise and InputMask)); ScriptCall('onPreciseUp'); +if cVolumeDelta > 0 then + cVolumeDelta:= 3; +if cVolumeDelta < 0 then + cVolumeDelta:= -3; end; procedure chLJump(var s: shortstring); @@ -595,13 +603,19 @@ procedure chVol_p(var s: shortstring); begin s:= s; // avoid compiler hint -inc(cVolumeDelta, 3) +if (LocalMessage and gmPrecise) <> 0 then + inc(cVolumeDelta, 1) +else + inc(cVolumeDelta, 3); end; procedure chVol_m(var s: shortstring); begin s:= s; // avoid compiler hint -dec(cVolumeDelta, 3) +if (LocalMessage and gmPrecise) <> 0 then + dec(cVolumeDelta, 1) +else + dec(cVolumeDelta, 3); end; procedure chMute(var s: shortstring); @@ -719,14 +733,20 @@ begin s:= s; // avoid compiler hint if ZoomValue < cMinZoomLevel then - ZoomValue:= ZoomValue + cZoomDelta; + if (LocalMessage and gmPrecise <> 0) then + ZoomValue:= ZoomValue + cZoomDeltaSmall + else + ZoomValue:= ZoomValue + cZoomDelta; end; procedure chZoomOut(var s: shortstring); begin s:= s; // avoid compiler hint if ZoomValue > cMaxZoomLevel then - ZoomValue:= ZoomValue - cZoomDelta; + if (LocalMessage and gmPrecise <> 0) then + ZoomValue:= ZoomValue - cZoomDeltaSmall + else + ZoomValue:= ZoomValue - cZoomDelta; end; procedure chZoomReset(var s: shortstring); diff -r c96889bf5796 -r 4eaeba349179 hedgewars/uVariables.pas --- a/hedgewars/uVariables.pas Tue Feb 05 02:18:13 2019 +0100 +++ b/hedgewars/uVariables.pas Tue Feb 05 02:46:41 2019 +0100 @@ -214,6 +214,7 @@ cMaxZoomLevel : real; cMinZoomLevel : real; cZoomDelta : real; + cZoomDeltaSmall : real; cMinMaxZoomLevelDelta : real; @@ -2631,13 +2632,15 @@ ZoomValue := cDefaultZoomLevel; {$IFDEF MOBILE} - cMaxZoomLevel:= 0.5; - cMinZoomLevel:= 3.5; - cZoomDelta:= 0.20; + cMaxZoomLevel := 0.5; + cMinZoomLevel := 3.5; + cZoomDelta := 0.20; + cZoomDeltaSmall := 0.10; {$ELSE} - cMaxZoomLevel:= 1.0; - cMinZoomLevel:= 3.0; - cZoomDelta:= 0.25; + cMaxZoomLevel := 1.0; + cMinZoomLevel := 3.0; + cZoomDelta := 0.25; + cZoomDeltaSmall := 0.125; {$ENDIF} {$IFDEF USE_VIDEO_RECORDING}