Class GuiScreen

java.lang.Object
net.minecraft.src.Gui
net.minecraft.src.GuiScreen
Direct Known Subclasses:
GuiAchievements, GuiChat, GuiCommandBlock, GuiConnecting, GuiContainer, GuiControls, GuiCreateFlatWorld, GuiCreateWorld, GuiDisconnected, GuiDownloadTerrain, GuiEditSign, GuiErrorScreen, GuiFlatPresets, GuiGameOver, GuiIngameMenu, GuiLanguage, GuiMainMenu, GuiMemoryErrorScreen, GuiMultiplayer, GuiOptions, GuiRenameWorld, GuiScreenAddServer, GuiScreenBackup, GuiScreenBook, GuiScreenClientOutdated, GuiScreenConfigureWorld, GuiScreenConfirmation, GuiScreenDemo, GuiScreenDisconnectedOnline, GuiScreenEditOnlineWorld, GuiScreenInvite, GuiScreenLongRunningTask, GuiScreenMcoWorldTemplate, GuiScreenOnlineServers, GuiScreenPendingInvitation, GuiScreenServerList, GuiScreenSubscription, GuiScreenTemporaryResourcePackSelect, GuiSelectWorld, GuiShareToLan, GuiSnooper, GuiStats, GuiVideoSettings, GuiWinGame, GuiYesNo, LockGui, REMIScreen, ScreenChatOptions, ScreenWithCallback

public class GuiScreen extends Gui
  • Field Details

    • mc

      protected Minecraft mc
      Reference to the Minecraft object.
    • width

      public int width
      The width of the screen object.
    • height

      public int height
      The height of the screen object.
    • buttonList

      protected List buttonList
      A list of all the buttons in this container.
    • allowUserInput

      public boolean allowUserInput
    • fontRenderer

      protected FontRenderer fontRenderer
      The FontRenderer used by GuiScreen
  • Constructor Details

    • GuiScreen

      public GuiScreen()
  • Method Details

    • drawScreen

      public void drawScreen(int par1, int par2, float par3)
      Draws the screen and all the components in it.
    • keyTyped

      protected void keyTyped(char par1, int par2)
      Fired when a key is typed. This is the equivalent of KeyListener.keyTyped(KeyEvent e).
    • getClipboardString

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

      public static void setClipboardString(String par0Str)
      store a string in the system clipboard
    • mouseClicked

      protected void mouseClicked(int par1, int par2, int par3)
      Called when the mouse is clicked.
    • mouseMovedOrUp

      protected void mouseMovedOrUp(int par1, int par2, int par3)
      Called when the mouse is moved or a mouse button is released. Signature: (mouseX, mouseY, which) which==-1 is mouseMove, which==0 or which==1 is mouseUp
    • mouseClickMove

      protected void mouseClickMove(int par1, int par2, int par3, long par4)
      Called when a mouse button is pressed and the mouse is moved around. Parameters are : mouseX, mouseY, lastButtonClicked and timeSinceMouseClick.
    • actionPerformed

      protected void actionPerformed(GuiButton par1GuiButton)
      Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
    • setWorldAndResolution

      public void setWorldAndResolution(Minecraft par1Minecraft, int par2, int par3)
      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.
    • handleInput

      public void handleInput()
      Delegates mouse and keyboard input.
    • handleMouseInput

      public void handleMouseInput()
      Handles mouse input.
    • handleKeyboardInput

      public void handleKeyboardInput()
      Handles keyboard input.
    • 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 par1)
    • drawBackground

      public void drawBackground(int par1)
      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
    • confirmClicked

      public void confirmClicked(boolean par1, int par2)
    • isCtrlKeyDown

      public static boolean isCtrlKeyDown()
    • isShiftKeyDown

      public static boolean isShiftKeyDown()