Class GuiScreen

    • Field Detail

      • width

        public int width
      • height

        public int height
      • buttonList

        protected java.util.List<GuiButton> buttonList
        + A list of all the buttons in this container.
      • labelList

        protected java.util.List<GuiLabel> labelList
        + A list of all the labels in this container.
      • allowUserInput

        public boolean allowUserInput
      • showingCloseKey

        protected long showingCloseKey
    • Constructor Detail

      • GuiScreen

        public GuiScreen()
    • Method Detail

      • drawScreen

        public void drawScreen​(int i,
                               int j,
                               float var3)
        + Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks
      • getCloseKey

        protected int getCloseKey()
      • keyTyped

        protected void keyTyped​(char parChar1,
                                int parInt1)
        + Fired when a key is typed (except F11 which toggles full screen). This is the equivalent of KeyListener.keyTyped(KeyEvent e). Args : character (character on the key), keyCode (lwjgl Keyboard key code)
      • getClipboardString

        public static java.lang.String getClipboardString()
        + Returns a string stored in the system clipboard.
      • setClipboardString

        public static void setClipboardString​(java.lang.String copyText)
        + Stores the given string in the system clipboard
      • renderToolTip

        protected void renderToolTip​(ItemStack itemstack,
                                     int i,
                                     int j)
      • drawCreativeTabHoveringText

        protected void drawCreativeTabHoveringText​(java.lang.String s,
                                                   int i,
                                                   int j)
        + Draws the text when mouse is over creative inventory tab. Params: current creative tab to be checked, current mouse x position, current mouse y position.
      • drawHoveringText

        protected void drawHoveringText​(java.util.List<java.lang.String> list,
                                        int i,
                                        int j)
        + Draws a List of strings as a tooltip. Every entry is drawn on a seperate line.
      • handleComponentHover

        protected void handleComponentHover​(IChatComponent parIChatComponent,
                                            int parInt1,
                                            int parInt2)
        + Draws the hover event specified by the given chat component
      • setText

        protected void setText​(java.lang.String var1,
                               boolean var2)
        + Sets the text of the chat
      • handleComponentClick

        protected boolean handleComponentClick​(IChatComponent parIChatComponent)
        + Executes the click event specified by the given chat component
      • sendChatMessage

        public void sendChatMessage​(java.lang.String msg)
      • sendChatMessage

        public void sendChatMessage​(java.lang.String msg,
                                    boolean addToChat)
      • mouseClicked

        protected void mouseClicked​(int parInt1,
                                    int parInt2,
                                    int parInt3)
        + Called when the mouse is clicked. Args : mouseX, mouseY, clickedButton
      • mouseReleased

        protected void mouseReleased​(int i,
                                     int j,
                                     int k)
        + Called when a mouse button is released. Args : mouseX, mouseY, releaseButton
      • mouseClickMove

        protected void mouseClickMove​(int var1,
                                      int var2,
                                      int var3,
                                      long var4)
        + Called when a mouse button is pressed and the mouse is moved around. Parameters are : mouseX, mouseY, lastButtonClicked & timeSinceMouseClick.
      • actionPerformed

        protected void actionPerformed​(GuiButton parGuiButton)
        + Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
      • setWorldAndResolution

        public void setWorldAndResolution​(Minecraft mc,
                                          int width,
                                          int height)
        + Causes the screen to lay out its subcomponents again. This is the equivalent of the Java call Container.validate()
      • initGui

        public void initGui()
        + Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the window resizes, the buttonList is cleared beforehand.
      • handleInput

        public void handleInput()
                         throws java.io.IOException
        + Delegates mouse and keyboard input.
        Throws:
        java.io.IOException
      • handleMouseInput

        public void handleMouseInput()
                              throws java.io.IOException
        + Handles mouse input.
        Throws:
        java.io.IOException
      • handleKeyboardInput

        public void handleKeyboardInput()
                                 throws java.io.IOException
        + Handles keyboard input.
        Throws:
        java.io.IOException
      • updateScreen

        public void updateScreen()
        + Called from the main game loop to update the screen.
      • onGuiClosed

        public void onGuiClosed()
        + Called when the screen is unloaded. Used to disable keyboard repeat events
      • drawDefaultBackground

        public void drawDefaultBackground()
        + Draws either a gradient over the background screen (when it exists) or a flat gradient over background.png
      • drawWorldBackground

        public void drawWorldBackground​(int i)
      • drawBackground

        public void drawBackground​(int tint)
        + Draws the background (i is always 0 as of 1.2.2)
      • doesGuiPauseGame

        public boolean doesGuiPauseGame()
        + Returns true if this GUI should pause the game when it is displayed in single-player
      • isCtrlKeyDown

        public static boolean isCtrlKeyDown()
        + Returns true if either windows ctrl key is down or if either mac meta key is down
      • isShiftKeyDown

        public static boolean isShiftKeyDown()
        + Returns true if either shift key is down
      • isAltKeyDown

        public static boolean isAltKeyDown()
        + Returns true if either alt key is down
      • isKeyComboCtrlX

        public static boolean isKeyComboCtrlX​(int parInt1)
      • isKeyComboCtrlV

        public static boolean isKeyComboCtrlV​(int parInt1)
      • isKeyComboCtrlC

        public static boolean isKeyComboCtrlC​(int parInt1)
      • isKeyComboCtrlA

        public static boolean isKeyComboCtrlA​(int parInt1)
      • onResize

        public void onResize​(Minecraft mcIn,
                             int parInt1,
                             int parInt2)
        + Called when the GUI is resized in order to update the world and the resolution