@Override
  protected void keyTyped(char par1, int key) {
    super.keyTyped(par1, key);

    if (key == 1 || key == this.mc.gameSettings.keyBindInventory.keyCode) {
      this.mc.thePlayer.closeScreen();
      //        	this.mc.displayGuiScreen((GuiScreen)null);
    }

    if (key == mc.gameSettings.keyBindLeft.keyCode) {
      retreatPage();
    } else if (key == mc.gameSettings.keyBindRight.keyCode) {
      advancePage();
    }

    //        if (DustMod.debug && key == mc.gameSettings.keyBindChat.keyCode)
    //        {
    //            EntityPlayer player = ModLoader.getMinecraftInstance().thePlayer;
    //            int scroll = 0;
    //
    //            if (getRunePage() != 0)
    //            {
    //                scroll = DustManager.getShape(getRunePage() - 1).id;
    //                ItemStack to = new ItemStack(DustMod.dustScroll, 1, scroll);
    //                player.inventory.addItemStackToInventory(to);
    //            }
    //            else
    //            {
    //                ItemStack to = new ItemStack(DustMod.negateSacrifice, 64);
    //                player.inventory.addItemStackToInventory(to);
    //            }
    //        }
  }
예제 #2
0
 /** Fired when a key is typed. This is the equivalent of KeyListener.keyTyped(KeyEvent e). */
 protected void keyTyped(char par1, int par2) {
   if (par2 == mc.gameSettings.keyBindInventory.keyCode) {
     mc.displayGuiScreen(null);
     mc.setIngameFocus();
   } else {
     super.keyTyped(par1, par2);
   }
 }
예제 #3
0
 protected void keyTyped(char c, int i) {
   if (buttonId >= 0) {
     options.setKeyBinding(buttonId, i);
     ((GuiButton) controlList.get(buttonId)).displayString =
         options.getOptionDisplayString(buttonId);
     buttonId = -1;
   } else {
     super.keyTyped(c, i);
   }
 }
예제 #4
0
 protected void keyTyped(char c, int i) {
   if (recording && !SimpleKeyBindingManager.isModifierKey(i)) {
     item.setKey(i);
     item.setRawModifiers((byte) 0);
     SimpleKeyBindingManager.setModifiersToShortcut(item);
     recording = false;
     updateRecordButton();
   } else {
     super.keyTyped(c, i);
   }
 }