@@ -31,22 +31,11 @@ import net.runelite.client.config.ConfigItem;
|
||||
@ConfigGroup("zoom")
|
||||
public interface ZoomConfig extends Config
|
||||
{
|
||||
@ConfigItem(
|
||||
keyName = "enabled",
|
||||
name = "Expand outer zoom limit",
|
||||
description = "Configures whether or not the outer zoom limit is reduced",
|
||||
position = 1
|
||||
)
|
||||
default boolean outerLimit()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "inner",
|
||||
name = "Expand inner zoom limit",
|
||||
description = "Configures whether or not the inner zoom limit is reduced",
|
||||
position = 2
|
||||
position = 1
|
||||
)
|
||||
default boolean innerLimit()
|
||||
{
|
||||
@@ -57,7 +46,7 @@ public interface ZoomConfig extends Config
|
||||
keyName = "relaxCameraPitch",
|
||||
name = "Vertical camera",
|
||||
description = "Relax the camera's upper pitch limit",
|
||||
position = 3
|
||||
position = 2
|
||||
)
|
||||
default boolean relaxCameraPitch()
|
||||
{
|
||||
@@ -68,7 +57,7 @@ public interface ZoomConfig extends Config
|
||||
keyName = "requireControlDown",
|
||||
name = "Require control down",
|
||||
description = "Configures if holding control is required for zooming",
|
||||
position = 4
|
||||
position = 3
|
||||
)
|
||||
default boolean requireControlDown()
|
||||
{
|
||||
|
||||
@@ -37,13 +37,14 @@ import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.input.KeyListener;
|
||||
import net.runelite.client.input.KeyManager;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
|
||||
//@PluginDescriptor(
|
||||
// name = "Camera Zoom",
|
||||
// description = "Expand zoom limit and/or enable vertical camera",
|
||||
// tags = {"limit", "vertical"},
|
||||
// enabledByDefault = false
|
||||
//)
|
||||
@PluginDescriptor(
|
||||
name = "Camera Zoom",
|
||||
description = "Expand zoom limit and/or enable vertical camera",
|
||||
tags = {"limit", "vertical"},
|
||||
enabledByDefault = false
|
||||
)
|
||||
public class ZoomPlugin extends Plugin implements KeyListener
|
||||
{
|
||||
private boolean controlDown;
|
||||
@@ -81,34 +82,16 @@ public class ZoomPlugin extends Plugin implements KeyListener
|
||||
intStack[intStackSize - 1] = 1;
|
||||
}
|
||||
|
||||
if (zoomConfig.outerLimit())
|
||||
if ("innerZoomLimit".equals(event.getEventName()) && zoomConfig.innerLimit())
|
||||
{
|
||||
switch (event.getEventName())
|
||||
{
|
||||
case "fixedOuterZoomLimit":
|
||||
intStack[intStackSize - 1] = 95;
|
||||
break;
|
||||
case "resizableOuterZoomLimit":
|
||||
intStack[intStackSize - 1] = 70;
|
||||
break;
|
||||
}
|
||||
intStack[intStackSize - 1] = 1200;
|
||||
return;
|
||||
}
|
||||
|
||||
if (zoomConfig.innerLimit())
|
||||
{
|
||||
switch (event.getEventName())
|
||||
{
|
||||
case "fixedInnerZoomLimit":
|
||||
intStack[intStackSize - 1] = 2100;
|
||||
break;
|
||||
case "resizableInnerZoomLimit":
|
||||
intStack[intStackSize - 1] = 2200;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (zoomConfig.outerLimit() || zoomConfig.innerLimit())
|
||||
{
|
||||
// This lets the options panel's slider have an exponential rate
|
||||
final double exponent = 3.d;
|
||||
final double exponent = 2.d;
|
||||
switch (event.getEventName())
|
||||
{
|
||||
case "zoomLinToExp":
|
||||
|
||||
Reference in New Issue
Block a user