-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cada0ba
commit e0ec32f
Showing
7 changed files
with
61 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 9 additions & 13 deletions
22
src/main/java/com/sweetrpg/crafttracker/common/registry/ModKeyBindings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,26 @@ | ||
package com.sweetrpg.crafttracker.common.registry; | ||
|
||
import com.mojang.blaze3d.platform.InputConstants; | ||
import com.sweetrpg.crafttracker.common.lib.Constants; | ||
import net.minecraft.client.KeyMapping; | ||
import net.minecraftforge.client.ClientRegistry; | ||
import net.minecraftforge.client.settings.KeyConflictContext; | ||
|
||
public class ModKeyBindings { | ||
|
||
public static final String KEY_CATEGORIES_CRAFT_TRACKER = "key.categories.crafttracker"; | ||
public static final String KEY_ADD_TO_QUEUE = "key.addToQueue"; | ||
public static final String KEY_TOGGLE_CRAFT_LIST = "key.toggleCraftList"; | ||
public static final String KEY_TOGGLE_SHOPPING_LIST = "key.toggleShoppingList"; | ||
public static final String KEY_OPEN_QUEUE_MANAGER = "key.openQueueManager"; | ||
public static final String KEY_POPULATE_SHOPPING_LIST = "key.populateShoppingList"; | ||
|
||
public static final KeyMapping ADD_TO_QUEUE_MAPPING = new KeyMapping(KEY_ADD_TO_QUEUE, KeyConflictContext.GUI, InputConstants.Type.KEYSYM, InputConstants.KEY_Q, KEY_CATEGORIES_CRAFT_TRACKER); | ||
public static final KeyMapping TOGGLE_CRAFT_LIST_MAPPING = new KeyMapping(KEY_TOGGLE_CRAFT_LIST, KeyConflictContext.GUI, InputConstants.Type.KEYSYM, InputConstants.KEY_RSHIFT | InputConstants.KEY_L, KEY_CATEGORIES_CRAFT_TRACKER); | ||
public static final KeyMapping TOGGLE_SHOPPING_LIST_MAPPING = new KeyMapping(KEY_TOGGLE_SHOPPING_LIST, KeyConflictContext.GUI, InputConstants.Type.KEYSYM, InputConstants.KEY_RSHIFT | InputConstants.KEY_S, KEY_CATEGORIES_CRAFT_TRACKER); | ||
public static final KeyMapping OPEN_QUEUE_MANAGER_MAPPING = new KeyMapping(KEY_OPEN_QUEUE_MANAGER, KeyConflictContext.GUI, InputConstants.Type.KEYSYM, InputConstants.KEY_RSHIFT | InputConstants.KEY_M, KEY_CATEGORIES_CRAFT_TRACKER); | ||
public static final KeyMapping POPULATE_SHOPPING_LIST_MAPPING = new KeyMapping(KEY_POPULATE_SHOPPING_LIST, KeyConflictContext.GUI, InputConstants.Type.KEYSYM, InputConstants.KEY_RSHIFT | InputConstants.KEY_P, KEY_CATEGORIES_CRAFT_TRACKER); | ||
public static final KeyMapping ADD_TO_QUEUE_MAPPING = new KeyMapping(Constants.TRANSLATION_KEY_BINDINGS_ADDTOQUEUE_TITLE, KeyConflictContext.GUI, InputConstants.Type.KEYSYM, InputConstants.KEY_Q, Constants.KEY_BINDINGS_CATEGORY_TITLE); | ||
public static final KeyMapping TOGGLE_CRAFT_QUEUE_MAPPING = new KeyMapping(Constants.TRANSLATION_KEY_BINDINGS_TOGGLE_CRAFT_QUEUE_TITLE, KeyConflictContext.GUI, InputConstants.Type.KEYSYM, InputConstants.KEY_RSHIFT | InputConstants.KEY_L, Constants.KEY_BINDINGS_CATEGORY_TITLE); | ||
public static final KeyMapping TOGGLE_SHOPPING_LIST_MAPPING = new KeyMapping(Constants.TRANSLATION_KEY_BINDINGS_TOGGLE_SHOPPING_LIST_TITLE, KeyConflictContext.GUI, InputConstants.Type.KEYSYM, InputConstants.KEY_RSHIFT | InputConstants.KEY_S, Constants.KEY_BINDINGS_CATEGORY_TITLE); | ||
public static final KeyMapping OPEN_QUEUE_MANAGER_MAPPING = new KeyMapping(Constants.TRANSLATION_KEY_BINDINGS_OPEN_QMGR_TITLE, KeyConflictContext.GUI, InputConstants.Type.KEYSYM, InputConstants.KEY_RSHIFT | InputConstants.KEY_M, Constants.KEY_BINDINGS_CATEGORY_TITLE); | ||
public static final KeyMapping POPULATE_SHOPPING_LIST_MAPPING = new KeyMapping(Constants.TRANSLATION_KEY_BINDINGS_POPULATE_SHOPPING_LIST_TITLE, KeyConflictContext.GUI, InputConstants.Type.KEYSYM, InputConstants.KEY_RSHIFT | InputConstants.KEY_P, Constants.KEY_BINDINGS_CATEGORY_TITLE); | ||
public static final KeyMapping CLEAR_SHOPPING_LIST_MAPPING = new KeyMapping(Constants.TRANSLATION_KEY_BINDINGS_CLEAR_SHOPPING_LIST_TITLE, KeyConflictContext.GUI, InputConstants.Type.KEYSYM, InputConstants.KEY_RSHIFT | InputConstants.KEY_K, Constants.KEY_BINDINGS_CATEGORY_TITLE); | ||
|
||
public static void init() { | ||
ClientRegistry.registerKeyBinding(ADD_TO_QUEUE_MAPPING); | ||
ClientRegistry.registerKeyBinding(TOGGLE_CRAFT_LIST_MAPPING); | ||
ClientRegistry.registerKeyBinding(TOGGLE_CRAFT_QUEUE_MAPPING); | ||
ClientRegistry.registerKeyBinding(TOGGLE_SHOPPING_LIST_MAPPING); | ||
ClientRegistry.registerKeyBinding(OPEN_QUEUE_MANAGER_MAPPING); | ||
ClientRegistry.registerKeyBinding(POPULATE_SHOPPING_LIST_MAPPING); | ||
ClientRegistry.registerKeyBinding(CLEAR_SHOPPING_LIST_MAPPING); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.