public class UISlot extends UIComponent<UISlot>
ITransformable.Alpha, ITransformable.Brightness, ITransformable.Color, ITransformable.Position<T>, ITransformable.Rotate, ITransformable.Scale, ITransformable.Size<T>, ITransformable.Translate| Modifier and Type | Field and Description |
|---|---|
static boolean |
buttonRelased
Whether the mouse button has been released at least once.
|
protected UITooltip |
defaultTooltip |
protected GuiIcon |
icon
Icon to use for the background of this
UISlot |
protected GuiIcon |
iconLeft
Icon for Mojang fix
|
protected GuiIcon |
iconTop
Icon for Mojang fix
|
protected MalisisSlot |
slot
Slot to draw containing the itemStack
|
| Constructor and Description |
|---|
UISlot(MalisisGui gui)
Instantiates a new
UISlot. |
UISlot(MalisisGui gui,
MalisisSlot slot)
Instantiates a new
UISlot. |
| Modifier and Type | Method and Description |
|---|---|
void |
clickSlot(MouseEvent.ButtonStateEvent event) |
void |
doubleClick(MouseEvent.DoubleClick event) |
void |
dragStack(MouseEvent.Drag event) |
void |
drawBackground(GuiRenderer renderer,
int mouseX,
int mouseY,
float partialTick)
Called first when drawing this
UIComponent. |
void |
drawForeground(GuiRenderer renderer,
int mouseX,
int mouseY,
float partialTick)
Called last when drawing this
UIComponent. |
void |
onHovered(StateChangeEvent.HoveredStateChange<UISlot> event) |
void |
onKeyTyped(KeyboardEvent event) |
void |
onSlotChanged(InventoryEvent.SlotChanged event) |
UISlot |
setTooltip(UITooltip tooltip)
Sets the
UITooltip of this UIComponent. |
protected void |
updateTooltip()
|
addControlComponent, componentX, componentY, draw, fireEvent, fireKeyboardEvent, fireMouseEvent, getAlpha, getAnchor, getComponentAt, getGui, getHeight, getName, getParent, getPropertyString, getRawHeight, getRawWidth, getTooltip, getWidth, getX, getY, getZIndex, isDisabled, isFocused, isHovered, isInsideBounds, isRelativeHeight, isRelativeWidth, isVisible, onAddedToScreen, parentX, parentY, register, relativeX, relativeY, removeAllControlComponents, removeControlComponent, screenX, screenY, setAlpha, setAnchor, setDisabled, setFocused, setHovered, setName, setParent, setPosition, setPosition, setSize, setTooltip, setVisible, setZIndex, toString, unregisterprotected GuiIcon iconLeft
protected GuiIcon iconTop
public static boolean buttonRelased
protected MalisisSlot slot
protected UITooltip defaultTooltip
public UISlot(MalisisGui gui, MalisisSlot slot)
UISlot.gui - the guislot - the slotpublic UISlot(MalisisGui gui)
UISlot.gui - the guipublic UISlot setTooltip(UITooltip tooltip)
UIComponentUITooltip of this UIComponent.setTooltip in class UIComponent<UISlot>tooltip - the tooltipUIComponentprotected void updateTooltip()
public void drawBackground(GuiRenderer renderer, int mouseX, int mouseY, float partialTick)
UIComponentUIComponent.drawBackground in class UIComponent<UISlot>renderer - the renderermouseX - the mouse xmouseY - the mouse ypartialTick - the partial tickpublic void drawForeground(GuiRenderer renderer, int mouseX, int mouseY, float partialTick)
UIComponentUIComponent.drawForeground in class UIComponent<UISlot>renderer - the renderermouseX - the mouse xmouseY - the mouse ypartialTick - the partial tickpublic void clickSlot(MouseEvent.ButtonStateEvent event)
public void dragStack(MouseEvent.Drag event)
public void doubleClick(MouseEvent.DoubleClick event)
public void onKeyTyped(KeyboardEvent event)
public void onSlotChanged(InventoryEvent.SlotChanged event)
public void onHovered(StateChangeEvent.HoveredStateChange<UISlot> event)