Package net.minecraft.client.gui
Class GuiScreen
- java.lang.Object
- 
- net.minecraft.client.gui.Gui
- 
- net.minecraft.client.gui.GuiScreen
 
 
- 
- All Implemented Interfaces:
- GuiYesNoCallback
 - Direct Known Subclasses:
- GuiAchievements,- GuiAuthenticationScreen,- GuiChat,- GuiCommandBlock,- GuiConnecting,- GuiContainer,- GuiControls,- GuiCustomizeSkin,- GuiDisconnected,- GuiDownloadTerrain,- GuiEditSign,- GuiErrorScreen,- GuiGameOver,- GuiHandshakeApprove,- GuiIngameMenu,- GuiLanguage,- GuiMainMenu,- GuiMemoryErrorScreen,- GuiMultiplayer,- GuiOptions,- GuiScreenAddServer,- GuiScreenBook,- GuiScreenEditProfile,- GuiScreenOptionsSounds,- GuiScreenResourcePacks,- GuiScreenServerList,- GuiScreenWorking,- GuiStats,- GuiVideoSettings,- GuiWinGame,- GuiYesNo,- ScreenChatOptions
 
 public abstract class GuiScreen extends Gui implements GuiYesNoCallback 
- 
- 
Field SummaryFields Modifier and Type Field Description booleanallowUserInputprotected java.util.List<GuiButton>buttonList+ A list of all the buttons in this container.protected FontRendererfontRendererObjintheightprotected RenderItemitemRenderprotected java.util.List<GuiLabel>labelList+ A list of all the labels in this container.protected Minecraftmcprotected longshowingCloseKeyintwidth- 
Fields inherited from class net.minecraft.client.gui.Guiicons, optionsBackground, statIcons, zLevel
 
- 
 - 
Constructor SummaryConstructors Constructor Description GuiScreen()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidactionPerformed(GuiButton parGuiButton)+ Called by the controls from the buttonList when activated.voidconfirmClicked(boolean flag, int i)booleandoesGuiPauseGame()+ Returns true if this GUI should pause the game when it is displayed in single-playervoiddrawBackground(int tint)+ Draws the background (i is always 0 as of 1.2.2)protected voiddrawCreativeTabHoveringText(java.lang.String s, int i, int j)+ Draws the text when mouse is over creative inventory tab.voiddrawDefaultBackground()+ Draws either a gradient over the background screen (when it exists) or a flat gradient over background.pngprotected voiddrawHoveringText(java.util.List<java.lang.String> list, int i, int j)+ Draws a List of strings as a tooltip.voiddrawScreen(int i, int j, float var3)+ Draws the screen and all the components in it.voiddrawWorldBackground(int i)static java.lang.StringgetClipboardString()+ Returns a string stored in the system clipboard.protected intgetCloseKey()protected booleanhandleComponentClick(IChatComponent parIChatComponent)+ Executes the click event specified by the given chat componentprotected voidhandleComponentHover(IChatComponent parIChatComponent, int parInt1, int parInt2)+ Draws the hover event specified by the given chat componentvoidhandleInput()+ Delegates mouse and keyboard input.voidhandleKeyboardInput()+ Handles keyboard input.voidhandleMouseInput()+ Handles mouse input.voidinitGui()+ Adds the buttons (and other controls) to the screen in question.static booleanisAltKeyDown()+ Returns true if either alt key is downstatic booleanisCtrlKeyDown()+ Returns true if either windows ctrl key is down or if either mac meta key is downstatic booleanisKeyComboCtrlA(int parInt1)static booleanisKeyComboCtrlC(int parInt1)static booleanisKeyComboCtrlV(int parInt1)static booleanisKeyComboCtrlX(int parInt1)static booleanisShiftKeyDown()+ Returns true if either shift key is downprotected voidkeyTyped(char parChar1, int parInt1)+ Fired when a key is typed (except F11 which toggles full screen).protected voidmouseClicked(int parInt1, int parInt2, int parInt3)+ Called when the mouse is clicked.protected voidmouseClickMove(int var1, int var2, int var3, long var4)+ Called when a mouse button is pressed and the mouse is moved around.protected voidmouseReleased(int i, int j, int k)+ Called when a mouse button is released.voidonGuiClosed()+ Called when the screen is unloaded.voidonResize(Minecraft mcIn, int parInt1, int parInt2)+ Called when the GUI is resized in order to update the world and the resolutionprotected voidrenderToolTip(ItemStack itemstack, int i, int j)voidsendChatMessage(java.lang.String msg)voidsendChatMessage(java.lang.String msg, boolean addToChat)static voidsetClipboardString(java.lang.String copyText)+ Stores the given string in the system clipboardprotected voidsetText(java.lang.String var1, boolean var2)+ Sets the text of the chatvoidsetWorldAndResolution(Minecraft mc, int width, int height)+ Causes the screen to lay out its subcomponents again.voidupdateScreen()+ Called from the main game loop to update the screen.- 
Methods inherited from class net.minecraft.client.gui.GuidrawCenteredString, drawGradientRect, drawHorizontalLine, drawModalRectWithCustomSizedTexture, drawRect, drawScaledCustomSizeModalRect, drawString, drawTexturedModalRect, drawTexturedModalRect, drawTexturedModalRect, drawVerticalLine
 
- 
 
- 
- 
- 
Field Detail- 
mcprotected Minecraft mc 
 - 
itemRenderprotected RenderItem itemRender 
 - 
widthpublic int width 
 - 
heightpublic int height 
 - 
buttonListprotected java.util.List<GuiButton> buttonList + A list of all the buttons in this container.
 - 
labelListprotected java.util.List<GuiLabel> labelList + A list of all the labels in this container.
 - 
allowUserInputpublic boolean allowUserInput 
 - 
fontRendererObjprotected FontRenderer fontRendererObj 
 - 
showingCloseKeyprotected long showingCloseKey 
 
- 
 - 
Method Detail- 
drawScreenpublic void drawScreen(int i, int j, float var3)+ Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks
 - 
getCloseKeyprotected int getCloseKey() 
 - 
keyTypedprotected 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)
 - 
getClipboardStringpublic static java.lang.String getClipboardString() + Returns a string stored in the system clipboard.
 - 
setClipboardStringpublic static void setClipboardString(java.lang.String copyText) + Stores the given string in the system clipboard
 - 
renderToolTipprotected void renderToolTip(ItemStack itemstack, int i, int j) 
 - 
drawCreativeTabHoveringTextprotected 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.
 - 
drawHoveringTextprotected 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.
 - 
handleComponentHoverprotected void handleComponentHover(IChatComponent parIChatComponent, int parInt1, int parInt2) + Draws the hover event specified by the given chat component
 - 
setTextprotected void setText(java.lang.String var1, boolean var2)+ Sets the text of the chat
 - 
handleComponentClickprotected boolean handleComponentClick(IChatComponent parIChatComponent) + Executes the click event specified by the given chat component
 - 
sendChatMessagepublic void sendChatMessage(java.lang.String msg) 
 - 
sendChatMessagepublic void sendChatMessage(java.lang.String msg, boolean addToChat)
 - 
mouseClickedprotected void mouseClicked(int parInt1, int parInt2, int parInt3)+ Called when the mouse is clicked. Args : mouseX, mouseY, clickedButton
 - 
mouseReleasedprotected void mouseReleased(int i, int j, int k)+ Called when a mouse button is released. Args : mouseX, mouseY, releaseButton
 - 
mouseClickMoveprotected 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.
 - 
actionPerformedprotected void actionPerformed(GuiButton parGuiButton) + Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
 - 
setWorldAndResolutionpublic 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()
 - 
initGuipublic 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.
 - 
handleInputpublic void handleInput() throws java.io.IOException+ Delegates mouse and keyboard input.- Throws:
- java.io.IOException
 
 - 
handleMouseInputpublic void handleMouseInput() throws java.io.IOException+ Handles mouse input.- Throws:
- java.io.IOException
 
 - 
handleKeyboardInputpublic void handleKeyboardInput() throws java.io.IOException+ Handles keyboard input.- Throws:
- java.io.IOException
 
 - 
updateScreenpublic void updateScreen() + Called from the main game loop to update the screen.
 - 
onGuiClosedpublic void onGuiClosed() + Called when the screen is unloaded. Used to disable keyboard repeat events
 - 
drawDefaultBackgroundpublic void drawDefaultBackground() + Draws either a gradient over the background screen (when it exists) or a flat gradient over background.png
 - 
drawWorldBackgroundpublic void drawWorldBackground(int i) 
 - 
drawBackgroundpublic void drawBackground(int tint) + Draws the background (i is always 0 as of 1.2.2)
 - 
doesGuiPauseGamepublic boolean doesGuiPauseGame() + Returns true if this GUI should pause the game when it is displayed in single-player
 - 
confirmClickedpublic void confirmClicked(boolean flag, int i)- Specified by:
- confirmClickedin interface- GuiYesNoCallback
 
 - 
isCtrlKeyDownpublic static boolean isCtrlKeyDown() + Returns true if either windows ctrl key is down or if either mac meta key is down
 - 
isShiftKeyDownpublic static boolean isShiftKeyDown() + Returns true if either shift key is down
 - 
isAltKeyDownpublic static boolean isAltKeyDown() + Returns true if either alt key is down
 - 
isKeyComboCtrlXpublic static boolean isKeyComboCtrlX(int parInt1) 
 - 
isKeyComboCtrlVpublic static boolean isKeyComboCtrlV(int parInt1) 
 - 
isKeyComboCtrlCpublic static boolean isKeyComboCtrlC(int parInt1) 
 - 
isKeyComboCtrlApublic static boolean isKeyComboCtrlA(int parInt1) 
 - 
onResizepublic void onResize(Minecraft mcIn, int parInt1, int parInt2) + Called when the GUI is resized in order to update the world and the resolution
 
- 
 
-