@Override protected final void keyTyped(char typedChar, int keyCode) throws IOException { super.keyTyped(typedChar, keyCode); if (keyCode == 1 || this.mc.gameSettings.keyBindInventory.isActiveAndMatches(keyCode)) exitGui(); ComponentScreenManager.type(typedChar, keyCode); }
@Override public final void keyTyped(char c, int key) { super.keyTyped(c, key); if (ModList.NEI.isLoaded() && key == NEIClientConfig.getKeyBinding("gui.recipe")) { int x = ReikaGuiAPI.instance.getMouseRealX(); int y = ReikaGuiAPI.instance.getMouseRealY(); int j = (width - xSize) / 2 - 2; int k = (height - ySize) / 2 - 8; if (x >= j && y >= k && x < j + xSize && y < k + ySize) { ItemStack is = ReikaGuiAPI.instance.getItemRenderAt(x, y); if (is != null) { GuiCraftingRecipe.openRecipeGui("item", is); } } } if (key == Keyboard.KEY_LEFT) { this.prevPage(); } else if (key == Keyboard.KEY_RIGHT) { this.nextPage(); } else if (key == Keyboard.KEY_PRIOR) { this.prevScreen(); } else if (key == Keyboard.KEY_NEXT) { this.nextScreen(); } }
@Override protected void keyTyped(char par1, int par2) { super.keyTyped(par1, par2); if (par2 > 2 && nbt.getBoolean("canDisplay")) { PacketSenders.sendKeyEvent(par1, par2, tile); } }
@Override protected void keyTyped(char keyChar, int keyID) { if (this.textBoxPlayerToOpenFor.keyTyped(keyChar, keyID)) { return; } super.keyTyped(keyChar, keyID); }
/** Fired when a key is typed. This is the equivalent of KeyListener.keyTyped(KeyEvent e). */ protected void keyTyped(char par1, int par2) { if (par2 == this.mc.gameSettings.keyBindInventory.keyCode) { this.mc.displayGuiScreen((GuiScreen) null); this.mc.setIngameFocus(); } else { super.keyTyped(par1, par2); } }
@Override protected void keyTyped(char key, int par2) { super.keyTyped(key, par2); if (uriField.isFocused()) { uriField.textboxKeyTyped(key, par2); uri = uriField.getText(); if (MediaResolver.canPlayUri(MediaResolver.cleanUri(uri))) { uriField.setTextColor(defaultTextColor); } else { uriField.setTextColor(0xffff0000); } } if (Character.isDigit(key) || par2 == 14 || par2 == 52 || par2 == 199 || par2 == 203 || par2 == 205 || par2 == 207 || par2 == 211) { if (heightField.isFocused()) { heightField.textboxKeyTyped(key, par2); if (heightField.getText().length() != 0) { try { projectorHeight = Float.parseFloat(heightField.getText()); } catch (NumberFormatException e) { } } } else if (widthField.isFocused()) { widthField.textboxKeyTyped(key, par2); if (widthField.getText().length() != 0) { try { projectorWidth = Float.parseFloat(widthField.getText()); } catch (NumberFormatException e) { } } } else if (triggerRangeField.isFocused()) { triggerRangeField.textboxKeyTyped(key, par2); if (triggerRangeField.getText().length() != 0) { try { triggerRange = Float.parseFloat(triggerRangeField.getText()); } catch (NumberFormatException e) { } } } else if (fadeRangeField.isFocused()) { fadeRangeField.textboxKeyTyped(key, par2); if (fadeRangeField.getText().length() != 0) { try { fadeRange = Float.parseFloat(fadeRangeField.getText()); } catch (NumberFormatException e) { } } } } }
@Override protected void keyTyped(char c, int i) { super.keyTyped(c, i); if (channelField != null) { channelField.textboxKeyTyped(c, i); channelName = channelField.getText(); } if (i == Keyboard.KEY_ESCAPE) { te.resetTE(); mc.thePlayer.closeScreen(); } }