Skip to content

Commit

Permalink
Merge pull request #4 from GTNewHorizons/new_features
Browse files Browse the repository at this point in the history
Add hotkeys to move around recipes
  • Loading branch information
Dream-Master authored Jan 3, 2020
2 parents 9ed2314 + 8364eae commit f40272f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ mc_version=1.7.10
forge_version=10.13.4.1614-1.7.10
ccl_version=1.1.3.138
ccc_version=1.0.7.+
mod_version=2.0.0-pre-9-GTNH
mod_version=2.0.0-pre-10-GTNH
10 changes: 7 additions & 3 deletions resources/assets/nei/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,14 @@ nei.options.keys.gui.recipe=Recipe
nei.options.keys.gui.usage=Usage
nei.options.keys.gui.enchant=Enchantments
nei.options.keys.gui.potion=Potions
nei.options.keys.gui.back=Prev Recipe
nei.options.keys.gui.prev=Prev Page
nei.options.keys.gui.next=Next Page
nei.options.keys.gui.back=Back to last Recipe
nei.options.keys.gui.prev=Prev Item Panel Page
nei.options.keys.gui.next=Next Item Panel Page
nei.options.keys.gui.hide=Toggle NEI Visibility
nei.options.keys.gui.next_recipe=Next Recipe
nei.options.keys.gui.prev_recipe=Prev Recipe
nei.options.keys.gui.next_machine=Next Machine
nei.options.keys.gui.prev_machine=Prev Machine
nei.options.keys.gui.search=Focus Search Bar
nei.options.keys.gui.bookmark=Add Bookmark
nei.options.keys.world=World
Expand Down
4 changes: 4 additions & 0 deletions src/codechicken/nei/NEIClientConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ private static void setDefaultKeyBindings() {
API.addKeyBind("gui.potion", Keyboard.KEY_P);
API.addKeyBind("gui.prev", Keyboard.KEY_PRIOR);
API.addKeyBind("gui.next", Keyboard.KEY_NEXT);
API.addKeyBind("gui.prev_machine", Keyboard.KEY_UP);
API.addKeyBind("gui.next_machine", Keyboard.KEY_DOWN);
API.addKeyBind("gui.prev_recipe", Keyboard.KEY_LEFT);
API.addKeyBind("gui.next_recipe", Keyboard.KEY_RIGHT);
API.addKeyBind("gui.hide", Keyboard.KEY_O);
API.addKeyBind("gui.search", Keyboard.KEY_F);
API.addKeyBind("gui.bookmark", Keyboard.KEY_A);
Expand Down
11 changes: 10 additions & 1 deletion src/codechicken/nei/recipe/GuiRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;

import java.awt.Point;
Expand Down Expand Up @@ -76,7 +77,7 @@ public void initGui() {

@Override
public void keyTyped(char c, int i) {
if (i == 1)//esc
if (i == Keyboard.KEY_ESCAPE) //esc
{
mc.displayGuiScreen(firstGui);
return;
Expand All @@ -93,6 +94,14 @@ public void keyTyped(char c, int i) {
mc.displayGuiScreen(firstGui);
else if (i == NEIClientConfig.getKeyBinding("gui.back"))
mc.displayGuiScreen(prevGui);
else if (i == NEIClientConfig.getKeyBinding("gui.prev_machine"))
prevType();
else if (i == NEIClientConfig.getKeyBinding("gui.next_machine"))
nextType();
else if (i == NEIClientConfig.getKeyBinding("gui.prev_recipe"))
prevPage();
else if (i == NEIClientConfig.getKeyBinding("gui.next_recipe"))
nextPage();

}

Expand Down

0 comments on commit f40272f

Please sign in to comment.