Class RotatingItemIcon
java.lang.Object
com.ldtteam.blockui.UiRenderMacros
com.ldtteam.blockui.Pane
com.ldtteam.blockui.controls.ItemIcon
com.minecolonies.core.client.gui.blockui.RotatingItemIcon
public class RotatingItemIcon
extends com.ldtteam.blockui.controls.ItemIcon
Variation of the ItemIcon which accepts multiple items and slowly rotates between them.
* TODO: This needs to be ported to BlockUI at a later stage, with a proper animation handler,
* instead of being backed by a timer, increased through the draw methods.
* Conferred with Nightenom that we keep this in Minecolonies for the time being.
-
Field Summary
Fields inherited from class com.ldtteam.blockui.controls.ItemIcon
DEFAULT_ITEMSTACK_SIZE, FIX_VANILLA_TOOLTIP, itemStack, renderItemDecorations, tooltipUpdateScheduledFields inherited from class com.ldtteam.blockui.Pane
alignment, cursor, debugging, enabled, focus, height, hoverSource, id, lastClickedPane, mc, onHover, onHoverId, parent, visible, wasCursorInPane, width, window, x, yFields inherited from class com.ldtteam.blockui.UiRenderMacros
HALF_BIAS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddrawSelf(com.ldtteam.blockui.BOGuiGraphics ms, double mx, double my) voidsetDuration(int duration) The duration to switch between items, in ticks.voidSet all possible items.Methods inherited from class com.ldtteam.blockui.controls.ItemIcon
appendTooltip, clearDataAndScheduleTooltipUpdate, getItem, getModifiedItemStackTooltip, isDataEmpty, isItemEmpty, modifyTooltipName, onItemUpdate, onUpdate, renderItemDecorations, setItem, setItemFromBlockState, setItemFromBlockState, setRenderItemDecorations, updateTooltipIfNeeded, wrapShift, wrapShiftMethods inherited from class com.ldtteam.blockui.Pane
canHandleClick, clearFocus, click, disable, draw, drawHidden, drawLast, drawSelfLast, enable, findFirstPaneByType, findPaneByID, findPaneByType, findPaneOfTypeByID, getAlignment, getCursor, getFocus, getHeight, getHoverPane, getID, getParent, getWidth, getWindow, getX, getY, handleClick, handleHover, handleRightClick, hide, isClickable, isEnabled, isFocus, isPointInPane, isVisible, moveBy, off, on, onFocus, onFocusLost, onKeyTyped, onMouseDrag, parseChildren, putInside, rightClick, scissorsEnd, scissorsStart, scrollInput, setAlignment, setCursor, setEnabled, setFocus, setFocus, setHoverPane, setID, setParentView, setPosition, setSize, setVisible, setWindow, shouldDraw, show, wasCursorInPaneMethods inherited from class com.ldtteam.blockui.UiRenderMacros
blit, blit, blit, blit, blitRepeatable, drawEntity, drawLineRect, drawLineRect, drawLineRect, drawLineRectGradient, drawLineRectGradient, drawLineRectGradient, fill, fill, fillGradient, fillGradient, hLine, hLine, line, line, populateBlitTriangles, populateFillGradientTriangles, populateFillTriangles, vLine, vLine
-
Constructor Details
-
RotatingItemIcon
public RotatingItemIcon()Default constructor.
-
-
Method Details
-
setItems
Set all possible items.- Parameters:
items- the full list of items.
-
setDuration
public void setDuration(int duration) The duration to switch between items, in ticks. Defaults to 40 (2 seconds), minimum of 1 tick.- Parameters:
duration- the new duration.
-
drawSelf
public void drawSelf(com.ldtteam.blockui.BOGuiGraphics ms, double mx, double my) - Overrides:
drawSelfin classcom.ldtteam.blockui.controls.ItemIcon
-