mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
Changed the ESD's Keytyping because canitzp annoyed me with it
This commit is contained in:
parent
3fe11c88ce
commit
658e0387f9
2 changed files with 4 additions and 9 deletions
|
@ -7,9 +7,6 @@
|
|||
-Follows you around
|
||||
-Has an Inventory, a Crafting Table and a Furnace
|
||||
|
||||
-Instant Teleport Device
|
||||
-Teleports Players to where they look (Much like the Bukkit Compass)
|
||||
|
||||
-Ender Attractor / Repulsor
|
||||
-Attracts/Repulses Mobs
|
||||
-Has an aggressive and a friendly version
|
||||
|
|
|
@ -139,23 +139,21 @@ public class GuiInputter extends GuiContainer{
|
|||
|
||||
@Override
|
||||
public void keyTyped(char theChar, int key){
|
||||
if((!fieldPutStart.isFocused() && !fieldPutEnd.isFocused() && !fieldPullStart.isFocused() && !fieldPullEnd.isFocused())){
|
||||
super.keyTyped(theChar, key);
|
||||
}
|
||||
|
||||
if(key == Keyboard.KEY_RETURN || key == Keyboard.KEY_NUMPADENTER){
|
||||
if(this.fieldPutStart.isFocused()) this.setVariable(this.fieldPutStart, 0);
|
||||
if(this.fieldPutEnd.isFocused()) this.setVariable(this.fieldPutEnd, 1);
|
||||
if(this.fieldPullStart.isFocused()) this.setVariable(this.fieldPullStart, 2);
|
||||
if(this.fieldPullEnd.isFocused()) this.setVariable(this.fieldPullEnd, 3);
|
||||
}
|
||||
|
||||
if(Character.isDigit(theChar) || key == Keyboard.KEY_BACK || key == Keyboard.KEY_DELETE || key == Keyboard.KEY_LEFT || key == Keyboard.KEY_RIGHT){
|
||||
else if(Character.isDigit(theChar) || key == Keyboard.KEY_BACK || key == Keyboard.KEY_DELETE || key == Keyboard.KEY_LEFT || key == Keyboard.KEY_RIGHT){
|
||||
this.fieldPutStart.textboxKeyTyped(theChar, key);
|
||||
this.fieldPutEnd.textboxKeyTyped(theChar, key);
|
||||
this.fieldPullStart.textboxKeyTyped(theChar, key);
|
||||
this.fieldPullEnd.textboxKeyTyped(theChar, key);
|
||||
}
|
||||
else{
|
||||
super.keyTyped(theChar, key);
|
||||
}
|
||||
}
|
||||
|
||||
public void setVariable(GuiTextField field, int sendInt){
|
||||
|
|
Loading…
Reference in a new issue