camera: remove our compass look op config
this is now in vanilla
This commit is contained in:
@@ -148,17 +148,6 @@ public interface CameraConfig extends Config
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "compassLook",
|
||||
name = "Compass options",
|
||||
description = "Adds Look South, East, and West options to the compass",
|
||||
position = 10
|
||||
)
|
||||
default boolean compassLook()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "compassLookPreservePitch",
|
||||
name = "Preserve pitch on compass look",
|
||||
|
||||
@@ -30,7 +30,6 @@ import com.google.common.primitives.Ints;
|
||||
import com.google.inject.Provides;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.util.Arrays;
|
||||
import javax.inject.Inject;
|
||||
import javax.swing.SwingUtilities;
|
||||
import net.runelite.api.Client;
|
||||
@@ -44,7 +43,6 @@ import net.runelite.api.events.BeforeRender;
|
||||
import net.runelite.api.events.ClientTick;
|
||||
import net.runelite.api.events.FocusChanged;
|
||||
import net.runelite.api.events.GameStateChanged;
|
||||
import net.runelite.api.events.MenuEntryAdded;
|
||||
import net.runelite.api.events.ScriptCallbackEvent;
|
||||
import net.runelite.api.events.ScriptPreFired;
|
||||
import net.runelite.api.events.WidgetLoaded;
|
||||
@@ -77,11 +75,6 @@ public class CameraPlugin extends Plugin implements KeyListener, MouseListener
|
||||
private static final int DEFAULT_OUTER_ZOOM_LIMIT = 128;
|
||||
static final int DEFAULT_INNER_ZOOM_LIMIT = 896;
|
||||
|
||||
private static final String LOOK_NORTH = "Look North";
|
||||
private static final String LOOK_SOUTH = "Look South";
|
||||
private static final String LOOK_EAST = "Look East";
|
||||
private static final String LOOK_WEST = "Look West";
|
||||
|
||||
private boolean controlDown;
|
||||
// flags used to store the mousedown states
|
||||
private boolean rightClick;
|
||||
@@ -180,39 +173,6 @@ public class CameraPlugin extends Plugin implements KeyListener, MouseListener
|
||||
client.setInvertPitch(config.invertPitch());
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onMenuEntryAdded(MenuEntryAdded menuEntryAdded)
|
||||
{
|
||||
if (menuEntryAdded.getType() == MenuAction.CC_OP.getId() && menuEntryAdded.getOption().equals(LOOK_NORTH) && config.compassLook())
|
||||
{
|
||||
MenuEntry[] menuEntries = client.getMenuEntries();
|
||||
int len = menuEntries.length;
|
||||
MenuEntry north = menuEntries[len - 1];
|
||||
|
||||
menuEntries = Arrays.copyOf(menuEntries, len + 3);
|
||||
|
||||
// The handling for these entries is done in ToplevelCompassOp.rs2asm
|
||||
menuEntries[--len] = createCameraLookEntry(menuEntryAdded, 4, LOOK_WEST);
|
||||
menuEntries[++len] = createCameraLookEntry(menuEntryAdded, 3, LOOK_EAST);
|
||||
menuEntries[++len] = createCameraLookEntry(menuEntryAdded, 2, LOOK_SOUTH);
|
||||
menuEntries[++len] = north;
|
||||
|
||||
client.setMenuEntries(menuEntries);
|
||||
}
|
||||
}
|
||||
|
||||
private MenuEntry createCameraLookEntry(MenuEntryAdded lookNorth, int identifier, String option)
|
||||
{
|
||||
MenuEntry m = new MenuEntry();
|
||||
m.setOption(option);
|
||||
m.setTarget(lookNorth.getTarget());
|
||||
m.setIdentifier(identifier);
|
||||
m.setType(MenuAction.CC_OP.getId());
|
||||
m.setParam0(lookNorth.getActionParam0());
|
||||
m.setParam1(lookNorth.getActionParam1());
|
||||
return m;
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onScriptCallbackEvent(ScriptCallbackEvent event)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user