1
0
forked from Clones/Controlify

whoops partial commit

This commit is contained in:
isXander
2023-05-14 22:56:02 +01:00
parent 460de0d73f
commit 546916fc12
3 changed files with 23 additions and 1 deletions

View File

@ -11,7 +11,7 @@ public final class BindContexts {
GUI_VMOUSE_CURSOR_ONLY = ctx("gui_vmouse_cursor"), GUI_VMOUSE_CURSOR_ONLY = ctx("gui_vmouse_cursor"),
GUI_VMOUSE = ctx("gui_vmouse", GUI_VMOUSE_CURSOR_ONLY), GUI_VMOUSE = ctx("gui_vmouse", GUI_VMOUSE_CURSOR_ONLY),
CONTROLIFY_CONFIG = ctx("controlify_config", GUI), CONTROLIFY_CONFIG = ctx("controlify_config", GUI),
INVENTORY = ctx("inventory", GUI_VMOUSE_CURSOR_ONLY); INVENTORY = ctx("inventory");
private static BindContext ctx(String path, BindContext... parents) { private static BindContext ctx(String path, BindContext... parents) {
return new BindContext(Controlify.id(path), Set.of(parents)); return new BindContext(Controlify.id(path), Set.of(parents));

View File

@ -51,6 +51,7 @@ public class ControllerBindings<T extends ControllerState> {
CHANGE_PERSPECTIVE, CHANGE_PERSPECTIVE,
SWAP_HANDS, SWAP_HANDS,
OPEN_CHAT, OPEN_CHAT,
INV_SELECT, INV_QUICK_MOVE, INV_TAKE_HALF,
GUI_PRESS, GUI_BACK, GUI_PRESS, GUI_BACK,
GUI_NEXT_TAB, GUI_PREV_TAB, GUI_NEXT_TAB, GUI_PREV_TAB,
GUI_ABSTRACT_ACTION_1, GUI_ABSTRACT_ACTION_2, GUI_ABSTRACT_ACTION_1, GUI_ABSTRACT_ACTION_2,
@ -250,6 +251,24 @@ public class ControllerBindings<T extends ControllerState> {
.category(GUI_CATEGORY) .category(GUI_CATEGORY)
.context(BindContexts.GUI) .context(BindContexts.GUI)
.build()); .build());
register(INV_SELECT = ControllerBindingBuilder.create(controller)
.identifier("controlify", "inv_select")
.defaultBind(GamepadBinds.A_BUTTON)
.category(INVENTORY_CATEGORY)
.context(BindContexts.INVENTORY)
.build());
register(INV_QUICK_MOVE = ControllerBindingBuilder.create(controller)
.identifier("controlify", "inv_quick_move")
.defaultBind(GamepadBinds.Y_BUTTON)
.category(INVENTORY_CATEGORY)
.context(BindContexts.INVENTORY)
.build());
register(INV_TAKE_HALF = ControllerBindingBuilder.create(controller)
.identifier("controlify", "inv_take_half")
.defaultBind(GamepadBinds.X_BUTTON)
.category(INVENTORY_CATEGORY)
.context(BindContexts.INVENTORY)
.build());
register(PICK_BLOCK = ControllerBindingBuilder.create(controller) register(PICK_BLOCK = ControllerBindingBuilder.create(controller)
.identifier("controlify", "pick_block") .identifier("controlify", "pick_block")
.defaultBind(GamepadBinds.DPAD_LEFT) .defaultBind(GamepadBinds.DPAD_LEFT)

View File

@ -167,6 +167,9 @@
"controlify.binding.controlify.gui_abstract_action_1.desc": "A generic binding that may do different things depending on the current screen.", "controlify.binding.controlify.gui_abstract_action_1.desc": "A generic binding that may do different things depending on the current screen.",
"controlify.binding.controlify.gui_abstract_action_2": "GUI Abstract Action 2", "controlify.binding.controlify.gui_abstract_action_2": "GUI Abstract Action 2",
"controlify.binding.controlify.gui_abstract_action_2.desc": "A generic binding that may do different things depending on the current screen.", "controlify.binding.controlify.gui_abstract_action_2.desc": "A generic binding that may do different things depending on the current screen.",
"controlify.binding.controlify.inv_select": "Select Item",
"controlify.binding.controlify.inv_quick_move": "Quick Move",
"controlify.binding.controlify.inv_take_half": "Take Half",
"controlify.binding.controlify.drop": "Drop Item", "controlify.binding.controlify.drop": "Drop Item",
"controlify.binding.controlify.pick_block": "Pick Block", "controlify.binding.controlify.pick_block": "Pick Block",
"controlify.binding.controlify.toggle_hud_visibility": "Toggle HUD Visibility", "controlify.binding.controlify.toggle_hud_visibility": "Toggle HUD Visibility",