Package net.minecraft.src
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
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanprotected ListA list of all the buttons in this container.protected FontRendererThe FontRenderer used by GuiScreenintThe height of the screen object.protected MinecraftReference to the Minecraft object.intThe width of the screen object.Fields inherited from class net.minecraft.src.Gui
icons, optionsBackground, statIcons, zLevel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidactionPerformed(GuiButton par1GuiButton) Fired when a control is clicked.voidconfirmClicked(boolean par1, int par2) booleanReturns true if this GUI should pause the game when it is displayed in single-playervoiddrawBackground(int par1) Draws the background (i is always 0 as of 1.2.2)voidDraws either a gradient over the background screen (when it exists) or a flat gradient over background.pngvoiddrawScreen(int par1, int par2, float par3) Draws the screen and all the components in it.voiddrawWorldBackground(int par1) static StringReturns a string stored in the system clipboard.voidDelegates mouse and keyboard input.voidHandles keyboard input.voidHandles mouse input.voidinitGui()Adds the buttons (and other controls) to the screen in question.static booleanstatic booleanprotected voidkeyTyped(char par1, int par2) Fired when a key is typed.protected voidmouseClicked(int par1, int par2, int par3) Called when the mouse is clicked.protected voidmouseClickMove(int par1, int par2, int par3, long par4) Called when a mouse button is pressed and the mouse is moved around.protected voidmouseMovedOrUp(int par1, int par2, int par3) Called when the mouse is moved or a mouse button is released.voidCalled when the screen is unloaded.static voidsetClipboardString(String par0Str) store a string in the system clipboardvoidsetWorldAndResolution(Minecraft par1Minecraft, int par2, int par3) Causes the screen to lay out its subcomponents again.voidCalled from the main game loop to update the screen.Methods inherited from class net.minecraft.src.Gui
drawCenteredString, drawGradientRect, drawHorizontalLine, drawRect, drawString, drawTexturedModalRect, drawTexturedModelRectFromIcon, drawVerticalLine
-
Field Details
-
mc
Reference to the Minecraft object. -
width
public int widthThe width of the screen object. -
height
public int heightThe height of the screen object. -
buttonList
A list of all the buttons in this container. -
allowUserInput
public boolean allowUserInput -
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
Returns a string stored in the system clipboard. -
setClipboardString
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
Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e). -
setWorldAndResolution
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()
-