camera: add option to preserve pitch on compass look menu entries
This commit is contained in:
@@ -159,11 +159,22 @@ public interface CameraConfig extends Config
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "compassLookPreservePitch",
|
||||
name = "Preserve pitch on compass look",
|
||||
description = "Preserves the current pitch value (vertical angle) when using the compass look options.",
|
||||
position = 11
|
||||
)
|
||||
default boolean compassLookPreservePitch()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "invertYaw",
|
||||
name = "Invert Yaw",
|
||||
description = "Makes moving the camera horizontally with the mouse backwards",
|
||||
position = 11
|
||||
position = 12
|
||||
)
|
||||
default boolean invertYaw()
|
||||
{
|
||||
@@ -174,7 +185,7 @@ public interface CameraConfig extends Config
|
||||
keyName = "invertPitch",
|
||||
name = "Invert Pitch",
|
||||
description = "Makes moving the camera vertically with the mouse backwards",
|
||||
position = 12
|
||||
position = 13
|
||||
)
|
||||
default boolean invertPitch()
|
||||
{
|
||||
|
||||
@@ -249,6 +249,12 @@ public class CameraPlugin extends Plugin implements KeyListener, MouseListener
|
||||
return;
|
||||
}
|
||||
|
||||
if ("lookPreservePitch".equals(event.getEventName()) && config.compassLookPreservePitch())
|
||||
{
|
||||
intStack[intStackSize - 1] = client.getCameraPitch();
|
||||
return;
|
||||
}
|
||||
|
||||
if (config.innerLimit())
|
||||
{
|
||||
// This lets the options panel's slider have an exponential rate
|
||||
|
||||
@@ -47,6 +47,8 @@ LOOK:
|
||||
iconst 0
|
||||
sound_synth
|
||||
iconst 225
|
||||
sconst "lookPreservePitch"
|
||||
runelite_callback
|
||||
iconst 5
|
||||
randominc
|
||||
add
|
||||
|
||||
Reference in New Issue
Block a user