public class MalisisGui
extends net.minecraft.client.gui.GuiScreen
| Modifier and Type | Field and Description |
|---|---|
static GuiTexture |
BLOCK_TEXTURE |
protected UIComponent |
focusedComponent
Currently focused child component
|
protected boolean |
guiscreenBackground
Determines if the screen should be darkened when the GUI is opened.
|
protected UIComponent |
hoveredComponent
Currently hovered child component
|
protected MalisisInventoryContainer |
inventoryContainer
Inventory container that handles the inventories and slots actions.
|
static GuiTexture |
ITEM_TEXTURE |
protected long |
lastClickButton |
protected long |
lastClickTime
How long since last click.
|
protected int |
lastMouseX
Last known position of the mouse.
|
protected int |
lastMouseY
Last known position of the mouse.
|
protected GuiRenderer |
renderer
Renderer drawing the components.
|
| Modifier | Constructor and Description |
|---|---|
protected |
MalisisGui() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToScreen(UIComponent component)
Adds container to the screen.
|
void |
animate(Animation animation) |
void |
animate(Animation animation,
int delay) |
void |
clearScreen()
Removes all the components from the screen
|
void |
close()
Closes this
MalisisGui. |
static MalisisGui |
currentGui()
Gets the current
MalisisGui displayed. |
void |
display()
Displays this
MalisisGui. |
boolean |
doesGuiPauseGame() |
protected void |
doubleClick(int x,
int y,
int button)
Called when a button is double clicked.
|
void |
drawScreen(int mouseX,
int mouseY,
float partialTicks)
Draws this
MalisisGui. |
protected boolean |
fireEvent(GuiEvent event)
Fires a
GuiEvent for this MalisisGui. |
UIComponent |
getComponentAt(int x,
int y)
Gets the
UIContainer at the specified coordinates inside this MalisisGui. |
long |
getElapsedTime()
Gets elapsed time since the GUI was opened.
|
static UIComponent |
getFocusedComponent()
Gets the currently focused
UIComponent |
GuiTexture |
getGuiTexture() |
static UIComponent |
getHoveredComponent() |
MalisisInventoryContainer |
getInventoryContainer()
Gets the
MalisisInventoryContainer for this MalisisGui. |
void |
handleMouseInput()
Called every frame to handle mouse input.
|
protected void |
keyTyped(char keyChar,
int keyCode)
Called when a key is pressed on the keyboard.
|
protected void |
mouseClicked(int x,
int y,
int button)
Called when a mouse button is pressed down.
|
protected void |
mouseClickMove(int x,
int y,
int button,
long timer)
Called when the mouse is moved while a button is pressed.
|
protected void |
mouseMovedOrUp(int x,
int y,
int button)
Called when a mouse button is released.
|
void |
onGuiClosed() |
static void |
sendAction(MalisisInventoryContainer.ActionType action,
MalisisSlot slot,
int code)
Sends a GUI action to the server.
|
static boolean |
setFocusedComponent(UIComponent component,
boolean focused) |
static boolean |
setHoveredComponent(UIComponent component,
boolean hovered)
Sets the hovered state for a
UIComponent. |
void |
setInventoryContainer(MalisisInventoryContainer container)
Sets the
MalisisInventoryContainer for this MalisisGui. |
void |
setWorldAndResolution(net.minecraft.client.Minecraft minecraft,
int width,
int height)
Called when game resolution changes.
|
void |
update(int mouseX,
int mouseY,
float partialTick)
Called every frame.
|
void |
updateGui()
Called from TE when TE is updated.
|
actionPerformed, confirmClicked, drawBackground, drawCreativeTabHoveringText, drawDefaultBackground, drawHoveringText, drawWorldBackground, func_146283_a, getClipboardString, handleInput, handleKeyboardInput, initGui, isCtrlKeyDown, isShiftKeyDown, renderToolTip, setClipboardString, updateScreenpublic static GuiTexture BLOCK_TEXTURE
public static GuiTexture ITEM_TEXTURE
protected GuiRenderer renderer
protected boolean guiscreenBackground
protected int lastMouseX
protected int lastMouseY
protected long lastClickButton
protected long lastClickTime
protected MalisisInventoryContainer inventoryContainer
protected UIComponent hoveredComponent
protected UIComponent focusedComponent
public void setInventoryContainer(MalisisInventoryContainer container)
MalisisInventoryContainer for this MalisisGui.container - the inventory containerpublic MalisisInventoryContainer getInventoryContainer()
MalisisInventoryContainer for this MalisisGui.public GuiTexture getGuiTexture()
public long getElapsedTime()
protected void addToScreen(UIComponent component)
component - the componentpublic void clearScreen()
public UIComponent getComponentAt(int x, int y)
UIContainer at the specified coordinates inside this MalisisGui.x - the x coordinatey - the y coordinatescreenprotected boolean fireEvent(GuiEvent event)
GuiEvent for this MalisisGui.event - the eventpublic void handleMouseInput()
handleMouseInput in class net.minecraft.client.gui.GuiScreenprotected void mouseClicked(int x,
int y,
int button)
mouseClicked in class net.minecraft.client.gui.GuiScreenprotected void mouseClickMove(int x,
int y,
int button,
long timer)
mouseClickMove in class net.minecraft.client.gui.GuiScreenprotected void mouseMovedOrUp(int x,
int y,
int button)
mouseMovedOrUp in class net.minecraft.client.gui.GuiScreenprotected void doubleClick(int x,
int y,
int button)
x - the xy - the ybutton - the buttonprotected void keyTyped(char keyChar,
int keyCode)
keyTyped in class net.minecraft.client.gui.GuiScreenpublic void setWorldAndResolution(net.minecraft.client.Minecraft minecraft,
int width,
int height)
setWorldAndResolution in class net.minecraft.client.gui.GuiScreenpublic void drawScreen(int mouseX,
int mouseY,
float partialTicks)
MalisisGui.drawScreen in class net.minecraft.client.gui.GuiScreenpublic void update(int mouseX,
int mouseY,
float partialTick)
mouseX - the mouse xmouseY - the mouse ypartialTick - the partial tickpublic void updateGui()
public void animate(Animation animation)
public void animate(Animation animation, int delay)
public boolean doesGuiPauseGame()
doesGuiPauseGame in class net.minecraft.client.gui.GuiScreenpublic void display()
MalisisGui.public void close()
MalisisGui.public void onGuiClosed()
onGuiClosed in class net.minecraft.client.gui.GuiScreenpublic static MalisisGui currentGui()
MalisisGui displayed.MalisisGuipublic static void sendAction(MalisisInventoryContainer.ActionType action, MalisisSlot slot, int code)
action - the actionslot - the slotcode - the keyboard codepublic static UIComponent getHoveredComponent()
UIComponent. null if there is no current GUI.public static boolean setHoveredComponent(UIComponent component, boolean hovered)
UIComponent. If a UIComponent is currently hovered, it will be "unhovered" first.component - the component that gets his state changedhovered - the hovered statepublic static UIComponent getFocusedComponent()
UIComponentpublic static boolean setFocusedComponent(UIComponent component, boolean focused)