Added shortcut to clear Grid crafting matrix, fixes #1516
This commit is contained in:
@@ -2,13 +2,16 @@ package com.raoulvdberge.refinedstorage;
|
||||
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
import net.minecraftforge.client.settings.KeyConflictContext;
|
||||
import net.minecraftforge.client.settings.KeyModifier;
|
||||
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
public final class RSKeyBindings {
|
||||
public static final KeyBinding FOCUS_SEARCH_BAR = new KeyBinding("key.refinedstorage.focusSearchBar", KeyConflictContext.GUI, Keyboard.KEY_TAB, "Refined Storage");
|
||||
public static final KeyBinding CLEAR_GRID_CRAFTING_MATRIX = new KeyBinding("key.refinedstorage.clearGridCraftingMatrix", KeyConflictContext.GUI, KeyModifier.CONTROL, Keyboard.KEY_X, "Refined Storage");
|
||||
|
||||
public static void init() {
|
||||
ClientRegistry.registerKeyBinding(FOCUS_SEARCH_BAR);
|
||||
ClientRegistry.registerKeyBinding(CLEAR_GRID_CRAFTING_MATRIX);
|
||||
}
|
||||
}
|
||||
@@ -680,6 +680,8 @@ public class GuiGrid extends GuiBase implements IGridDisplay {
|
||||
|
||||
saveHistory();
|
||||
keyHandled = true;
|
||||
} else if (keyCode == RSKeyBindings.CLEAR_GRID_CRAFTING_MATRIX.getKeyCode()) {
|
||||
RS.INSTANCE.network.sendToServer(new MessageGridClear());
|
||||
} else {
|
||||
super.keyTyped(character, keyCode);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
itemGroup.refinedstorage=Refined Storage
|
||||
|
||||
key.refinedstorage.focusSearchBar=Grid Search Bar Focus
|
||||
key.refinedstorage.focusSearchBar=Focus Grid Search Bar
|
||||
key.refinedstorage.clearGridCraftingMatrix=Clear Grid Crafting Matrix
|
||||
|
||||
gui.refinedstorage:controller.0=Controller
|
||||
gui.refinedstorage:controller.1=Creative Controller
|
||||
|
||||
Reference in New Issue
Block a user