mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-14 08:53:48 +01:00
Merge pull request #4188 from OutCraft-Mods/patch-1
Update StationScreen to use InputConstants
This commit is contained in:
commit
a54c81861b
1 changed files with 3 additions and 1 deletions
|
@ -5,6 +5,7 @@ import java.util.List;
|
|||
import java.util.function.Consumer;
|
||||
|
||||
import com.jozufozu.flywheel.core.PartialModel;
|
||||
import com.mojang.blaze3d.platform.InputConstants;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.simibubi.create.AllBlockPartials;
|
||||
|
@ -310,7 +311,8 @@ public class StationScreen extends AbstractStationScreen {
|
|||
|
||||
@Override
|
||||
public boolean keyPressed(int pKeyCode, int pScanCode, int pModifiers) {
|
||||
boolean hitEnter = getFocused() instanceof EditBox && (pKeyCode == 257 || pKeyCode == 335);
|
||||
boolean hitEnter = getFocused() instanceof EditBox
|
||||
&& (pKeyCode == InputConstants.KEY_RETURN || pKeyCode == InputConstants.KEY_NUMPADENTER);
|
||||
|
||||
if (hitEnter && nameBox.isFocused()) {
|
||||
nameBox.setFocus(false);
|
||||
|
|
Loading…
Reference in a new issue