public class Window<G extends net.minecraft.client.gui.GuiScreen & IGuiSizable> extends ElementGroup implements IWindowElement
| Modifier and Type | Field and Description |
|---|---|
protected G |
gui |
protected int |
mouseX |
protected int |
mouseY |
elementscropElement, cropHeight, cropWidth, cropX, cropY, height, parent, visible, width, xOffset, xPos, yOffset, yPos| Modifier and Type | Method and Description |
|---|---|
void |
drawTooltip(int mouseX,
int mouseY) |
IGuiElement |
getDraggedElement() |
IGuiElement |
getFocusedElement() |
net.minecraft.client.gui.FontRenderer |
getFontRenderer() |
G |
getGui() |
int |
getGuiHeight()
Returns the current gui height.
|
int |
getGuiLeft() |
int |
getGuiTop() |
int |
getGuiWidth()
Returns the current gui width.
|
protected net.minecraft.client.Minecraft |
getMinecraft() |
IGuiElement |
getMousedOverElement() |
int |
getMouseX()
Returns the mouse position.
|
int |
getMouseY()
Returns the mouse position.
|
int |
getRelativeMouseX(IGuiElement element)
Returns the mouse position relative to the given element.
|
int |
getRelativeMouseY(IGuiElement element)
Returns the mouse position relative to the given element.
|
int |
getScreenHeight()
Returns the current screen height.
|
int |
getScreenWidth()
Returns the current screen width.
|
net.minecraft.client.renderer.texture.TextureManager |
getTextureManager() |
java.util.List<java.lang.String> |
getTooltip(int mouseX,
int mouseY)
Returns the tooltip that this element provides at the given mouse position.
|
IWindowElement |
getWindow()
The root of the containment hierarchy that this element is part of.
|
void |
init(int guiLeft,
int guiTop) |
boolean |
isDragged(IGuiElement element) |
boolean |
isFocused(IGuiElement element) |
boolean |
isMouseOver(IGuiElement element) |
void |
setDraggedElement(IGuiElement widget) |
void |
setDraggedElement(IGuiElement widget,
int button) |
void |
setFocusedElement(IGuiElement widget) |
void |
setMousedOverElement(IGuiElement widget) |
void |
setMousePosition(int mouseX,
int mouseY) |
IGuiElement |
setParent(IGuiElement parent)
Sets the parent of this element.
|
void |
updateClient()
Updates the element.
|
protected void |
updateWindow() |
add, clear, drawable, drawable, drawElement, getElements, getLastElement, horizontal, horizontal, item, label, label, label, label, label, label, layoutHelper, pane, pane, remove, splitText, splitText, splitText, splitText, vertical, verticaladdEventHandler, addTooltip, addTooltip, addTooltip, clearTooltip, draw, getAbsoluteX, getAbsoluteY, getAlign, getCropElement, getCropHeight, getCropWidth, getCropX, getCropY, getHeight, getParent, getTooltip, getWidth, getX, getY, hasTooltip, hide, isCropped, isEnabled, isMouseOver, isMouseOver, isVisible, onCreation, onDeletion, onUpdateClient, receiveEvent, setAlign, setBounds, setCroppedZone, setHeight, setLocation, setOffset, setSize, setWidth, setXPosition, setYPosition, show, toStringdrawCenteredString, drawGradientRect, drawHorizontalLine, drawModalRectWithCustomSizedTexture, drawRect, drawScaledCustomSizeModalRect, drawString, drawTexturedModalRect, drawTexturedModalRect, drawTexturedModalRect, drawVerticalLineclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, add, add, clear, getElements, getLastElement, horizontal, horizontal, item, item, label, label, label, label, label, label, layoutHelper, pane, pane, remove, remove, remove, splitText, splitText, splitText, splitText, vertical, verticaladdEventHandler, addEventHandler, addEventHandler, addSelfEventHandler, addTooltip, addTooltip, addTooltip, canFocus, canMouseOver, clearTooltip, draw, drawElement, getAbsoluteX, getAbsoluteY, getAlign, getHeight, getParent, getTooltip, getWidth, getX, getY, hasTooltip, hide, isEnabled, isMouseOver, isMouseOver, isVisible, onCreation, onDeletion, postEvent, postEvent, receiveEvent, setAlign, setBounds, setHeight, setLocation, setOffset, setSize, setWidth, setXPosition, setYPosition, showgetCropElement, getCropHeight, getCropWidth, getCropX, getCropY, isCropped, setCroppedZoneprotected final G extends net.minecraft.client.gui.GuiScreen & IGuiSizable gui
protected int mouseX
protected int mouseY
public Window(int width,
int height,
G gui)
public IWindowElement getWindow()
IGuiElementgetWindow in interface IGuiElementgetWindow in class GuiElementpublic IGuiElement setParent(@Nullable IGuiElement parent)
IGuiElementsetParent in interface IGuiElementsetParent in class GuiElementpublic void init(int guiLeft,
int guiTop)
@Nullable public IGuiElement getDraggedElement()
getDraggedElement in interface IWindowElementpublic void setDraggedElement(@Nullable
IGuiElement widget)
public void setDraggedElement(@Nullable
IGuiElement widget,
int button)
@Nullable public IGuiElement getMousedOverElement()
getMousedOverElement in interface IWindowElementpublic void setMousedOverElement(@Nullable
IGuiElement widget)
@Nullable public IGuiElement getFocusedElement()
getFocusedElement in interface IWindowElementpublic void setFocusedElement(@Nullable
IGuiElement widget)
public boolean isMouseOver(IGuiElement element)
isMouseOver in interface IWindowElementpublic boolean isDragged(IGuiElement element)
isDragged in interface IWindowElementpublic boolean isFocused(IGuiElement element)
isFocused in interface IWindowElementpublic void updateClient()
IGuiElementGuiScreen.updateScreen().updateClient in interface IGuiElementupdateClient in class ElementGroupprotected void updateWindow()
public void drawTooltip(int mouseX,
int mouseY)
public java.util.List<java.lang.String> getTooltip(int mouseX,
int mouseY)
IGuiElementgetTooltip in interface IGuiElementgetTooltip in class GuiElementmouseX - The x position of the mouse relative to the parent of the element.mouseY - The y position of the mouse relative to the parent of the element.public void setMousePosition(int mouseX,
int mouseY)
public int getMouseX()
IWindowElementgetMouseX in interface IWindowElementpublic int getMouseY()
IWindowElementgetMouseY in interface IWindowElementpublic int getRelativeMouseX(@Nullable
IGuiElement element)
IWindowElementgetRelativeMouseX in interface IWindowElementpublic int getRelativeMouseY(@Nullable
IGuiElement element)
IWindowElementgetRelativeMouseY in interface IWindowElementpublic int getScreenWidth()
IWindowElementgetScreenWidth in interface IWindowElementpublic int getScreenHeight()
IWindowElementgetScreenHeight in interface IWindowElementpublic int getGuiLeft()
getGuiLeft in interface IWindowElementpublic int getGuiTop()
getGuiTop in interface IWindowElementpublic G getGui()
getGui in interface IWindowElementpublic int getGuiHeight()
IWindowElementgetGuiHeight in interface IWindowElementpublic int getGuiWidth()
IWindowElementgetGuiWidth in interface IWindowElementprotected net.minecraft.client.Minecraft getMinecraft()
public net.minecraft.client.renderer.texture.TextureManager getTextureManager()
getTextureManager in interface IWindowElementpublic net.minecraft.client.gui.FontRenderer getFontRenderer()
getFontRenderer in interface IWindowElement