mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-22 13:19:44 +00:00
Add option to change mouse movement from Cinematic to Standard while in Angelica Zoom (#2166)
This commit is contained in:
1 parent
c10d30b2da
commit
977db3d604
6 files changed
+17
-3
No files matched your search
@@ -43,6 +43,10 @@ public class Zoom {
|
||||
return zoomEnabled;
|
||||
}
|
||||
|
||||
public static boolean isCinematicCameraEnabled(){
|
||||
return (boolean)Settings.ZOOM_CINEMATIC.option.getStore();
|
||||
}
|
||||
|
||||
public static void modifyZoom(int eventDWheel) {
|
||||
if (eventDWheel == 0) return;
|
||||
zoom = MathHelper.clamp_float((float) (zoom * Math.pow(ZOOM_STEP, Integer.signum(eventDWheel))), ZOOM_MIN, ZOOM_MAX);
|
||||
|
||||
@@ -176,7 +176,8 @@ public enum Settings {
|
||||
},
|
||||
VOID_FOG(new NotFineOptionTickBox(false, OptionImpact.LOW)),
|
||||
ZOOM_SMOOTH(new NotFineOptionTickBox(true, OptionImpact.LOW)),
|
||||
ZOOM_SMOOTH_SPEED(new NotFineOptionSlider(20, 1, 30, 1, OptionImpact.LOW));
|
||||
ZOOM_SMOOTH_SPEED(new NotFineOptionSlider(20, 1, 30, 1, OptionImpact.LOW)),
|
||||
ZOOM_CINEMATIC(new NotFineOptionTickBox(true, OptionImpact.LOW));
|
||||
|
||||
public final NotFineOption<?> option;
|
||||
|
||||
|
||||
@@ -168,6 +168,7 @@ public class NotFineGameOptionPages {
|
||||
groups.add(OptionGroup.createBuilder()
|
||||
.add(Settings.ZOOM_SMOOTH.option)
|
||||
.add(Settings.ZOOM_SMOOTH_SPEED.option)
|
||||
.add(Settings.ZOOM_CINEMATIC.option)
|
||||
.build());
|
||||
}
|
||||
|
||||
|
||||
@@ -830,6 +830,7 @@ public class SodiumGameOptionPages {
|
||||
groups.add(OptionGroup.createBuilder()
|
||||
.add(Settings.ZOOM_SMOOTH.option)
|
||||
.add(Settings.ZOOM_SMOOTH_SPEED.option)
|
||||
.add(Settings.ZOOM_CINEMATIC.option)
|
||||
.build());
|
||||
}
|
||||
|
||||
|
||||
@@ -82,4 +82,6 @@ options.background.random=Random
|
||||
options.zoom_smooth=Smooth Zoom
|
||||
options.zoom_smooth.tooltip=Smoothly interpolates the camera toward the zoom level instead of snapping instantly.
|
||||
options.zoom_smooth_speed=Smooth Zoom Speed
|
||||
options.zoom_smooth_speed.tooltip=How fast smooth zoom converges to the target zoom. Higher is snappier, lower is floatier. No effect when Smooth Zoom is off.
|
||||
options.zoom_smooth_speed.tooltip=How fast smooth zoom converges to the target zoom. Higher is snappier, lower is floatier. No effect when Smooth Zoom is off.
|
||||
options.zoom_cinematic=Cinematic Camera Zoom
|
||||
options.zoom_cinematic.tooltip=Whether or not to use the Cinematic Camera smooth movement. Off is standard Minecraft mouse camera movement where camera snaps to mouse position. On is floating uninterrupted movement after initial mouse movement, where the camera continues to shift after halting mouse movement.
|
||||
+6
-1
@@ -35,7 +35,12 @@ public class MixinEntityRenderer_Zoom {
|
||||
target = "Lnet/minecraft/client/settings/GameSettings;smoothCamera:Z",
|
||||
value = "FIELD"))
|
||||
private boolean angelica$checkZoomEnablement(GameSettings settings) {
|
||||
return settings.smoothCamera || Zoom.isZoomedIn();
|
||||
if (Zoom.isCinematicCameraEnabled()){
|
||||
return settings.smoothCamera || Zoom.isZoomedIn();
|
||||
}
|
||||
else{
|
||||
return settings.smoothCamera;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user