wasd plugin: rename to keyremapping plugin
Co-authored-by: Robert Alexander <rla@navadrag.com>
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.client.plugins.wasdcamera;
|
||||
package net.runelite.client.plugins.keyremapping;
|
||||
|
||||
import java.awt.event.KeyEvent;
|
||||
import net.runelite.client.config.Config;
|
||||
@@ -30,13 +30,13 @@ import net.runelite.client.config.ConfigGroup;
|
||||
import net.runelite.client.config.ConfigItem;
|
||||
import net.runelite.client.config.ModifierlessKeybind;
|
||||
|
||||
@ConfigGroup("wasdcamera")
|
||||
public interface WASDCameraConfig extends Config
|
||||
@ConfigGroup("keyremapping")
|
||||
public interface KeyRemappingConfig extends Config
|
||||
{
|
||||
@ConfigItem(
|
||||
position = 1,
|
||||
keyName = "up",
|
||||
name = "Up key",
|
||||
name = "Camera Up key",
|
||||
description = "The key which will replace up."
|
||||
)
|
||||
default ModifierlessKeybind up()
|
||||
@@ -47,7 +47,7 @@ public interface WASDCameraConfig extends Config
|
||||
@ConfigItem(
|
||||
position = 2,
|
||||
keyName = "down",
|
||||
name = "Down key",
|
||||
name = "Camera Down key",
|
||||
description = "The key which will replace down."
|
||||
)
|
||||
default ModifierlessKeybind down()
|
||||
@@ -58,7 +58,7 @@ public interface WASDCameraConfig extends Config
|
||||
@ConfigItem(
|
||||
position = 3,
|
||||
keyName = "left",
|
||||
name = "Left key",
|
||||
name = "Camera Left key",
|
||||
description = "The key which will replace left."
|
||||
)
|
||||
default ModifierlessKeybind left()
|
||||
@@ -69,7 +69,7 @@ public interface WASDCameraConfig extends Config
|
||||
@ConfigItem(
|
||||
position = 4,
|
||||
keyName = "right",
|
||||
name = "Right key",
|
||||
name = "Camera Right key",
|
||||
description = "The key which will replace right."
|
||||
)
|
||||
default ModifierlessKeybind right()
|
||||
@@ -23,7 +23,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.client.plugins.wasdcamera;
|
||||
package net.runelite.client.plugins.keyremapping;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import java.awt.event.KeyEvent;
|
||||
@@ -37,13 +37,13 @@ import net.runelite.client.callback.ClientThread;
|
||||
import net.runelite.client.input.KeyListener;
|
||||
import net.runelite.client.input.MouseAdapter;
|
||||
|
||||
class WASDCameraListener extends MouseAdapter implements KeyListener
|
||||
class KeyRemappingListener extends MouseAdapter implements KeyListener
|
||||
{
|
||||
@Inject
|
||||
private WASDCameraPlugin plugin;
|
||||
private KeyRemappingPlugin plugin;
|
||||
|
||||
@Inject
|
||||
private WASDCameraConfig config;
|
||||
private KeyRemappingConfig config;
|
||||
|
||||
@Inject
|
||||
private Client client;
|
||||
@@ -23,7 +23,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.client.plugins.wasdcamera;
|
||||
package net.runelite.client.plugins.keyremapping;
|
||||
|
||||
import com.google.inject.Provides;
|
||||
import java.awt.Color;
|
||||
@@ -50,12 +50,12 @@ import net.runelite.client.ui.JagexColors;
|
||||
import net.runelite.client.util.ColorUtil;
|
||||
|
||||
@PluginDescriptor(
|
||||
name = "WASD Camera",
|
||||
name = "Key Remapping",
|
||||
description = "Allows use of WASD keys for camera movement with 'Press Enter to Chat'",
|
||||
tags = {"enter", "chat"},
|
||||
tags = {"enter", "chat", "wasd", "camera"},
|
||||
enabledByDefault = false
|
||||
)
|
||||
public class WASDCameraPlugin extends Plugin
|
||||
public class KeyRemappingPlugin extends Plugin
|
||||
{
|
||||
private static final String PRESS_ENTER_TO_CHAT = "Press Enter to Chat...";
|
||||
private static final String SCRIPT_EVENT_SET_CHATBOX_INPUT = "setChatboxInput";
|
||||
@@ -71,7 +71,7 @@ public class WASDCameraPlugin extends Plugin
|
||||
private KeyManager keyManager;
|
||||
|
||||
@Inject
|
||||
private WASDCameraListener inputListener;
|
||||
private KeyRemappingListener inputListener;
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
@Setter(AccessLevel.PACKAGE)
|
||||
@@ -107,9 +107,9 @@ public class WASDCameraPlugin extends Plugin
|
||||
}
|
||||
|
||||
@Provides
|
||||
WASDCameraConfig getConfig(ConfigManager configManager)
|
||||
KeyRemappingConfig getConfig(ConfigManager configManager)
|
||||
{
|
||||
return configManager.getConfig(WASDCameraConfig.class);
|
||||
return configManager.getConfig(KeyRemappingConfig.class);
|
||||
}
|
||||
|
||||
boolean chatboxFocused()
|
||||
Reference in New Issue
Block a user