Java 类net.minecraft.client.gui.GuiControls 实例源码

项目:Zombe-Modpack    文件:Minecraft.java   
public void dispatchKeypresses()
{
    int i = Keyboard.getEventKey() == 0 ? Keyboard.getEventCharacter() + 256 : Keyboard.getEventKey();

    if (i != 0 && !Keyboard.isRepeatEvent())
    {
        if (!(this.currentScreen instanceof GuiControls) || ((GuiControls)this.currentScreen).time <= getSystemTime() - 20L)
        {
            if (Keyboard.getEventKeyState())
            {
                if (i == this.gameSettings.keyBindFullscreen.getKeyCode())
                {
                    this.toggleFullscreen();
                }
                else if (i == this.gameSettings.keyBindScreenshot.getKeyCode())
                {
                    this.ingameGUI.getChatGUI().printChatMessage(ScreenShotHelper.saveScreenshot(this.mcDataDir, this.displayWidth, this.displayHeight, this.framebufferMc));
                }
            }
        }
    }
}
项目:Backmemed    文件:Minecraft.java   
public void dispatchKeypresses()
{
    int i = Keyboard.getEventKey() == 0 ? Keyboard.getEventCharacter() + 256 : Keyboard.getEventKey();

    if (i != 0 && !Keyboard.isRepeatEvent())
    {
        if (!(this.currentScreen instanceof GuiControls) || ((GuiControls)this.currentScreen).time <= getSystemTime() - 20L)
        {
            if (Keyboard.getEventKeyState())
            {
                if (i == this.gameSettings.keyBindFullscreen.getKeyCode())
                {
                    this.toggleFullscreen();
                }
                else if (i == this.gameSettings.keyBindScreenshot.getKeyCode())
                {
                    this.ingameGUI.getChatGUI().printChatMessage(ScreenShotHelper.saveScreenshot(this.mcDataDir, this.displayWidth, this.displayHeight, this.framebufferMc));
                }
            }
        }
    }
}
项目:CustomWorldGen    文件:Minecraft.java   
public void dispatchKeypresses()
{
    int i = Keyboard.getEventKey() == 0 ? Keyboard.getEventCharacter() + 256 : Keyboard.getEventKey();

    if (i != 0 && !Keyboard.isRepeatEvent())
    {
        if (!(this.currentScreen instanceof GuiControls) || ((GuiControls)this.currentScreen).time <= getSystemTime() - 20L)
        {
            if (Keyboard.getEventKeyState())
            {
                if (this.gameSettings.keyBindFullscreen.isActiveAndMatches(i))
                {
                    this.toggleFullscreen();
                }
                else if (this.gameSettings.keyBindScreenshot.isActiveAndMatches(i))
                {
                    this.ingameGUI.getChatGUI().printChatMessage(ScreenShotHelper.saveScreenshot(this.mcDataDir, this.displayWidth, this.displayHeight, this.framebufferMc));
                }
            }
            else if (this.currentScreen instanceof GuiControls) ((GuiControls)this.currentScreen).buttonId = null;
        }
    }
}
项目:ExpandedRailsMod    文件:Minecraft.java   
public void dispatchKeypresses()
{
    int i = Keyboard.getEventKey() == 0 ? Keyboard.getEventCharacter() + 256 : Keyboard.getEventKey();

    if (i != 0 && !Keyboard.isRepeatEvent())
    {
        if (!(this.currentScreen instanceof GuiControls) || ((GuiControls)this.currentScreen).time <= getSystemTime() - 20L)
        {
            if (Keyboard.getEventKeyState())
            {
                if (this.gameSettings.keyBindFullscreen.isActiveAndMatches(i))
                {
                    this.toggleFullscreen();
                }
                else if (this.gameSettings.keyBindScreenshot.isActiveAndMatches(i))
                {
                    this.ingameGUI.getChatGUI().printChatMessage(ScreenShotHelper.saveScreenshot(this.mcDataDir, this.displayWidth, this.displayHeight, this.framebufferMc));
                }
            }
            else if (this.currentScreen instanceof GuiControls) ((GuiControls)this.currentScreen).buttonId = null;
        }
    }
}
项目:NBTEdit    文件:GuiNBTTree.java   
public void keyTyped(char ch, int key) {
    if (focusedSlotIndex != -1){
        saves[focusedSlotIndex].keyTyped(ch, key);
    }
    else{
        if (key == Keyboard.KEY_C && GuiControls.isCtrlKeyDown())
            copy();
        if (key == Keyboard.KEY_V && GuiControls.isCtrlKeyDown() && canPaste())
            paste();
        if (key == Keyboard.KEY_X && GuiControls.isCtrlKeyDown())
            cut();
    }
}
项目:RuneMagic    文件:RuneBinding.java   
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List list, boolean par4) {

    list.add("Hold Shift for more information");

    if(GuiControls.isShiftKeyDown()){

    list.add("");   
    list.add("The core of your crafting");
    //list.add("");
    list.add("Binding Tier : 1");
    }   
}
项目:RuneCraftery    文件:GuiControlsScrollPanel.java   
public GuiControlsScrollPanel(GuiControls controls, GameSettings options, Minecraft mc)
{
    super(mc, controls.width, controls.height, 16, (controls.height - 32) + 4, 25);
    this.controls = controls;
    this.options = options;
    this.mc = mc;
}
项目:RuneCraftery    文件:GuiControlsScrollPanel.java   
public GuiControlsScrollPanel(GuiControls controls, GameSettings options, Minecraft mc)
{
    super(mc, controls.width, controls.height, 16, (controls.height - 32) + 4, 25);
    this.controls = controls;
    this.options = options;
    this.mc = mc;
}
项目:BetterNutritionMod    文件:GuiControlsScrollPanel.java   
public GuiControlsScrollPanel(GuiControls controls, GameSettings options, Minecraft mc)
{
    super(mc, controls.width, controls.height, 16, (controls.height - 32) + 4, 25);
    this.controls = controls;
    this.options = options;
    this.mc = mc;
}
项目:BaseClient    文件:Minecraft.java   
public void dispatchKeypresses() {
    int i = Keyboard.getEventKey() == 0 ? Keyboard.getEventCharacter() : Keyboard.getEventKey();

    if (i != 0 && !Keyboard.isRepeatEvent()) {
        if (!(this.currentScreen instanceof GuiControls)
                || ((GuiControls) this.currentScreen).time <= getSystemTime() - 20L) {
            if (Keyboard.getEventKeyState()) {
                if (i == this.gameSettings.keyBindStreamStartStop.getKeyCode()) {
                    if (this.getTwitchStream().isBroadcasting()) {
                        this.getTwitchStream().stopBroadcasting();
                    } else if (this.getTwitchStream().isReadyToBroadcast()) {
                        this.displayGuiScreen(new GuiYesNo(new GuiYesNoCallback() {
                            public void confirmClicked(boolean result, int id) {
                                if (result) {
                                    Minecraft.this.getTwitchStream().func_152930_t();
                                }

                                Minecraft.this.displayGuiScreen((GuiScreen) null);
                            }
                        }, I18n.format("stream.confirm_start", new Object[0]), "", 0));
                    } else if (this.getTwitchStream().func_152928_D() && this.getTwitchStream().func_152936_l()) {
                        if (this.theWorld != null) {
                            this.ingameGUI.getChatGUI()
                                    .printChatMessage(new ChatComponentText("Not ready to start streaming yet!"));
                        }
                    } else {
                        GuiStreamUnavailable.func_152321_a(this.currentScreen);
                    }
                } else if (i == this.gameSettings.keyBindStreamPauseUnpause.getKeyCode()) {
                    if (this.getTwitchStream().isBroadcasting()) {
                        if (this.getTwitchStream().isPaused()) {
                            this.getTwitchStream().unpause();
                        } else {
                            this.getTwitchStream().pause();
                        }
                    }
                } else if (i == this.gameSettings.keyBindStreamCommercials.getKeyCode()) {
                    if (this.getTwitchStream().isBroadcasting()) {
                        this.getTwitchStream().requestCommercial();
                    }
                } else if (i == this.gameSettings.keyBindStreamToggleMic.getKeyCode()) {
                    this.stream.muteMicrophone(true);
                } else if (i == this.gameSettings.keyBindFullscreen.getKeyCode()) {
                    this.toggleFullscreen();
                } else if (i == this.gameSettings.keyBindScreenshot.getKeyCode()) {
                    this.ingameGUI.getChatGUI().printChatMessage(ScreenShotHelper.saveScreenshot(this.mcDataDir,
                            this.displayWidth, this.displayHeight, this.framebufferMc));
                }
            } else if (i == this.gameSettings.keyBindStreamToggleMic.getKeyCode()) {
                this.stream.muteMicrophone(false);
            }
        }
    }
}
项目:RuneCraftery    文件:GuiOptions.java   
protected void func_73875_a(GuiButton p_73875_1_) {
   if(p_73875_1_.field_73742_g) {
      if(p_73875_1_.field_73741_f < 100 && p_73875_1_ instanceof GuiSmallButton) {
         this.field_74051_d.func_74306_a(((GuiSmallButton)p_73875_1_).func_73753_a(), 1);
         p_73875_1_.field_73744_e = this.field_74051_d.func_74297_c(EnumOptions.func_74379_a(p_73875_1_.field_73741_f));
      }

      if(p_73875_1_.field_73741_f == 101) {
         this.field_73882_e.field_71474_y.func_74303_b();
         this.field_73882_e.func_71373_a(new GuiVideoSettings(this, this.field_74051_d));
      }

      if(p_73875_1_.field_73741_f == 100) {
         this.field_73882_e.field_71474_y.func_74303_b();
         this.field_73882_e.func_71373_a(new GuiControls(this, this.field_74051_d));
      }

      if(p_73875_1_.field_73741_f == 102) {
         this.field_73882_e.field_71474_y.func_74303_b();
         this.field_73882_e.func_71373_a(new GuiLanguage(this, this.field_74051_d, this.field_73882_e.func_135016_M()));
      }

      if(p_73875_1_.field_73741_f == 103) {
         this.field_73882_e.field_71474_y.func_74303_b();
         this.field_73882_e.func_71373_a(new ScreenChatOptions(this, this.field_74051_d));
      }

      if(p_73875_1_.field_73741_f == 104) {
         this.field_73882_e.field_71474_y.func_74303_b();
         this.field_73882_e.func_71373_a(new GuiSnooper(this, this.field_74051_d));
      }

      if(p_73875_1_.field_73741_f == 200) {
         this.field_73882_e.field_71474_y.func_74303_b();
         this.field_73882_e.func_71373_a(this.field_74053_c);
      }

      if(p_73875_1_.field_73741_f == 105) {
         this.field_73882_e.field_71474_y.func_74303_b();
         this.field_73882_e.func_71373_a(new GuiScreenTemporaryResourcePackSelect(this, this.field_74051_d));
      }

   }
}