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;
|
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(
|
@ConfigItem(
|
||||||
keyName = "invertYaw",
|
keyName = "invertYaw",
|
||||||
name = "Invert Yaw",
|
name = "Invert Yaw",
|
||||||
description = "Makes moving the camera horizontally with the mouse backwards",
|
description = "Makes moving the camera horizontally with the mouse backwards",
|
||||||
position = 11
|
position = 12
|
||||||
)
|
)
|
||||||
default boolean invertYaw()
|
default boolean invertYaw()
|
||||||
{
|
{
|
||||||
@@ -174,7 +185,7 @@ public interface CameraConfig extends Config
|
|||||||
keyName = "invertPitch",
|
keyName = "invertPitch",
|
||||||
name = "Invert Pitch",
|
name = "Invert Pitch",
|
||||||
description = "Makes moving the camera vertically with the mouse backwards",
|
description = "Makes moving the camera vertically with the mouse backwards",
|
||||||
position = 12
|
position = 13
|
||||||
)
|
)
|
||||||
default boolean invertPitch()
|
default boolean invertPitch()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -249,6 +249,12 @@ public class CameraPlugin extends Plugin implements KeyListener, MouseListener
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ("lookPreservePitch".equals(event.getEventName()) && config.compassLookPreservePitch())
|
||||||
|
{
|
||||||
|
intStack[intStackSize - 1] = client.getCameraPitch();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (config.innerLimit())
|
if (config.innerLimit())
|
||||||
{
|
{
|
||||||
// This lets the options panel's slider have an exponential rate
|
// This lets the options panel's slider have an exponential rate
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ LOOK:
|
|||||||
iconst 0
|
iconst 0
|
||||||
sound_synth
|
sound_synth
|
||||||
iconst 225
|
iconst 225
|
||||||
|
sconst "lookPreservePitch"
|
||||||
|
runelite_callback
|
||||||
iconst 5
|
iconst 5
|
||||||
randominc
|
randominc
|
||||||
add
|
add
|
||||||
|
|||||||
Reference in New Issue
Block a user