wasd plugin: rename to keyremapping plugin

Co-authored-by: Robert Alexander <rla@navadrag.com>
This commit is contained in:
Adam
2019-06-01 21:49:29 -04:00
committed by Adam
parent 4e357e121b
commit 907dc37d40
3 changed files with 18 additions and 18 deletions

View File

@@ -22,7 +22,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * 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 java.awt.event.KeyEvent;
import net.runelite.client.config.Config; 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.ConfigItem;
import net.runelite.client.config.ModifierlessKeybind; import net.runelite.client.config.ModifierlessKeybind;
@ConfigGroup("wasdcamera") @ConfigGroup("keyremapping")
public interface WASDCameraConfig extends Config public interface KeyRemappingConfig extends Config
{ {
@ConfigItem( @ConfigItem(
position = 1, position = 1,
keyName = "up", keyName = "up",
name = "Up key", name = "Camera Up key",
description = "The key which will replace up." description = "The key which will replace up."
) )
default ModifierlessKeybind up() default ModifierlessKeybind up()
@@ -47,7 +47,7 @@ public interface WASDCameraConfig extends Config
@ConfigItem( @ConfigItem(
position = 2, position = 2,
keyName = "down", keyName = "down",
name = "Down key", name = "Camera Down key",
description = "The key which will replace down." description = "The key which will replace down."
) )
default ModifierlessKeybind down() default ModifierlessKeybind down()
@@ -58,7 +58,7 @@ public interface WASDCameraConfig extends Config
@ConfigItem( @ConfigItem(
position = 3, position = 3,
keyName = "left", keyName = "left",
name = "Left key", name = "Camera Left key",
description = "The key which will replace left." description = "The key which will replace left."
) )
default ModifierlessKeybind left() default ModifierlessKeybind left()
@@ -69,7 +69,7 @@ public interface WASDCameraConfig extends Config
@ConfigItem( @ConfigItem(
position = 4, position = 4,
keyName = "right", keyName = "right",
name = "Right key", name = "Camera Right key",
description = "The key which will replace right." description = "The key which will replace right."
) )
default ModifierlessKeybind right() default ModifierlessKeybind right()

View File

@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * 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 com.google.common.base.Strings;
import java.awt.event.KeyEvent; 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.KeyListener;
import net.runelite.client.input.MouseAdapter; import net.runelite.client.input.MouseAdapter;
class WASDCameraListener extends MouseAdapter implements KeyListener class KeyRemappingListener extends MouseAdapter implements KeyListener
{ {
@Inject @Inject
private WASDCameraPlugin plugin; private KeyRemappingPlugin plugin;
@Inject @Inject
private WASDCameraConfig config; private KeyRemappingConfig config;
@Inject @Inject
private Client client; private Client client;

View File

@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * 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 com.google.inject.Provides;
import java.awt.Color; import java.awt.Color;
@@ -50,12 +50,12 @@ import net.runelite.client.ui.JagexColors;
import net.runelite.client.util.ColorUtil; import net.runelite.client.util.ColorUtil;
@PluginDescriptor( @PluginDescriptor(
name = "WASD Camera", name = "Key Remapping",
description = "Allows use of WASD keys for camera movement with 'Press Enter to Chat'", description = "Allows use of WASD keys for camera movement with 'Press Enter to Chat'",
tags = {"enter", "chat"}, tags = {"enter", "chat", "wasd", "camera"},
enabledByDefault = false 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 PRESS_ENTER_TO_CHAT = "Press Enter to Chat...";
private static final String SCRIPT_EVENT_SET_CHATBOX_INPUT = "setChatboxInput"; private static final String SCRIPT_EVENT_SET_CHATBOX_INPUT = "setChatboxInput";
@@ -71,7 +71,7 @@ public class WASDCameraPlugin extends Plugin
private KeyManager keyManager; private KeyManager keyManager;
@Inject @Inject
private WASDCameraListener inputListener; private KeyRemappingListener inputListener;
@Getter(AccessLevel.PACKAGE) @Getter(AccessLevel.PACKAGE)
@Setter(AccessLevel.PACKAGE) @Setter(AccessLevel.PACKAGE)
@@ -107,9 +107,9 @@ public class WASDCameraPlugin extends Plugin
} }
@Provides @Provides
WASDCameraConfig getConfig(ConfigManager configManager) KeyRemappingConfig getConfig(ConfigManager configManager)
{ {
return configManager.getConfig(WASDCameraConfig.class); return configManager.getConfig(KeyRemappingConfig.class);
} }
boolean chatboxFocused() boolean chatboxFocused()