Compare commits

...
2 Commits
Author SHA1 Message Date
tiffit bd0746583a Only send NEI keybinds when no widget is focused (#94) 2026-05-10 20:44:56 +02:00
Ranzu b4143fb0ef Fixed Compartment help tooltip display (#93) 2026-05-09 14:21:17 +02:00
3 changed files with 10 additions and 6 deletions

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@ dependencies {
api('com.github.GTNewHorizons:ForestryMC:4.11.12:dev')
implementation('com.github.GTNewHorizons:GTNHLib:0.9.48:dev')
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.8.88-GTNH:dev')
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.8.97-GTNH:dev')
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.57:api')
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
@@ -240,12 +240,16 @@ public class GuiCraftGUI extends GuiContainer {
@Override
protected void keyTyped(char c, int key) {
NEIHook.lastKeyTyped(key, c);
boolean noFocusedWidget = window.getFocusedWidget() == null;
if (key == 1 || (key == mc.gameSettings.keyBindInventory.getKeyCode() && window.getFocusedWidget() == null)) {
if (noFocusedWidget) {
NEIHook.lastKeyTyped(key, c);
}
if (key == 1 || (key == mc.gameSettings.keyBindInventory.getKeyCode() && noFocusedWidget)) {
mc.thePlayer.closeScreen();
}
IWidget origin = (window.getFocusedWidget() == null) ? window : window.getFocusedWidget();
IWidget origin = noFocusedWidget ? window : window.getFocusedWidget();
window.callEvent(new EventKey.Down(origin, c, key));
}
@@ -256,8 +256,8 @@ public class WindowCompartment extends WindowMachine implements IWindowAffectsSh
ControlSlide slide = new ControlSlide(this, 0.0f, 134.0f, 136.0f, 92.0f, Position.LEFT);
slide.setLabel(I18N.localise("binniecore.machine.storage.tab.properties"));
slide.setSlide(false);
slide.addHelp(I18N.localise("binniecore.machine.storage.tooltip.properties"));
slide.addHelp(I18N.localise("binniecore.machine.storage.tooltip.properties.desc"));
slide.addHelp(I18N.localise("binniecore.machine.storage.tab.properties"));
slide.addHelp(I18N.localise("binniecore.machine.storage.tab.properties.desc"));
Panel tabPropertyPanel = new Panel(slide, 16.0f, 8.0f, 112.0f, 76.0f, MinecraftGUI.PanelType.Gray);
int y2 = 4;
new ControlText(tabPropertyPanel, new IPoint(4.0f, y2), I18N.localise("binniecore.machine.storage.tab.name"));