Fix repeated key events not getting handled in search boxes (#1784)
GUIs are supposed to call enableRepeatEvents() from initGui() and onGuiClosed() to properly handle repeated key events. This change adds the appropriate calls in GuiBase. See the equivalent code in eg. Applied Energistics 2:cc9b33b473/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java (L224)
cc9b33b473/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java (L399)
Fixes https://github.com/raoulvdberge/refinedstorage/issues/1762
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
- Added OR search operator to the Grid with "|" (raoulvdberge)
|
- Added OR search operator to the Grid with "|" (raoulvdberge)
|
||||||
- getPatterns() now only returns all the outputs, this to limit memory usage in OpenComputers (only affects OC integration). (fspijkerman)
|
- getPatterns() now only returns all the outputs, this to limit memory usage in OpenComputers (only affects OC integration). (fspijkerman)
|
||||||
- Added new getPattern(stack:table) function for OpenComputers integration (fspijkerman)
|
- Added new getPattern(stack:table) function for OpenComputers integration (fspijkerman)
|
||||||
|
- Fixed repeated key events not getting handled in some cases (tomKPZ)
|
||||||
|
|
||||||
### 1.5.33
|
### 1.5.33
|
||||||
- Added Crafter Manager (raoulvdberge)
|
- Added Crafter Manager (raoulvdberge)
|
||||||
|
@@ -20,6 +20,8 @@ import net.minecraftforge.fluids.FluidStack;
|
|||||||
import net.minecraftforge.fml.client.config.GuiCheckBox;
|
import net.minecraftforge.fml.client.config.GuiCheckBox;
|
||||||
import net.minecraftforge.fml.client.config.GuiUtils;
|
import net.minecraftforge.fml.client.config.GuiUtils;
|
||||||
import net.minecraftforge.items.SlotItemHandler;
|
import net.minecraftforge.items.SlotItemHandler;
|
||||||
|
|
||||||
|
import org.lwjgl.input.Keyboard;
|
||||||
import org.lwjgl.input.Mouse;
|
import org.lwjgl.input.Mouse;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
@@ -101,6 +103,8 @@ public abstract class GuiBase extends GuiContainer {
|
|||||||
|
|
||||||
initializing = true;
|
initializing = true;
|
||||||
|
|
||||||
|
Keyboard.enableRepeatEvents(true);
|
||||||
|
|
||||||
calcHeight();
|
calcHeight();
|
||||||
|
|
||||||
super.initGui();
|
super.initGui();
|
||||||
@@ -117,6 +121,12 @@ public abstract class GuiBase extends GuiContainer {
|
|||||||
initializing = false;
|
initializing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onGuiClosed() {
|
||||||
|
super.onGuiClosed();
|
||||||
|
Keyboard.enableRepeatEvents(false);
|
||||||
|
}
|
||||||
|
|
||||||
protected void calcHeight() {
|
protected void calcHeight() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user