Class TTooltip
java.lang.Object
com.thecsdev.common.scene.Node<TElement>
com.thecsdev.commonmc.api.client.gui.TElement
com.thecsdev.commonmc.api.client.gui.tooltip.TTooltip
- All Implemented Interfaces:
INode<TElement>, INodeBounded<TElement,Bounds2i>, INodeRenderable<TElement, TGuiGraphics>, Iterable<TElement>, Collection<TElement>
-
Field Summary
Fields inherited from class TElement
eInitialized -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final TTooltipof(@NotNull CustomStat stat) A tooltip that shows the value of a given "custom stat" (also known as "general stat") in the statistics GUI.static final TTooltipof(@NotNull SubjectStats<?> stats) A tooltip that shows the player statistics for a givenSubjectStats.static final TTooltipof(@NotNull SubjectStats<?> stats, boolean showItemDescription) A tooltip that shows the player statistics for a givenSubjectStats.static final TTooltipof(@NotNull net.minecraft.network.chat.Component text) Creates and returns a new simple textual tooltip element.voidrenderCallback(@NotNull TGuiGraphics pencil) Callback method that is invoked when thisNodeis being rendered.Methods inherited from class TElement
addRel, boundsProperty, clearAndInit, clipsDescendantsProperty, contextMenuProperty, dragEndCallback, dragStartCallback, findElementAt, focusableProperty, focusGainedCallback, focusLostCallback, forEachVisible, getBaseType, getBounds, getClient, getContentBounds, getCursor, getSelf, getTooltip, hoverableProperty, hoverGainedCallback, hoverLostCallback, initCallback, inputCallback, invalidateTooltipCache, isFocusable, isFocused, isHoverable, isHovered, isHoveredOrFocused, isVisible, move, moveChildren, moveTo, postRenderCallback, removeRel, screenProperty, setBounds, setBounds, setBounds, showContextMenu, tickCallback, tooltipProperty, toString, visiblePropertyMethods inherited from class Node
add, addAll, childAddedCallback, childRemovedCallback, clear, contains, containsAll, equals, findChild, findParent, findSibling, forEach, get, getFirst, getLast, getParent, hashCode, indexOf, isEmpty, iterator, parentProperty, remove, remove, remove, removeAll, retainAll, rootProperty, size, toArray, toArray
-
Constructor Details
-
TTooltip
public TTooltip()
-
-
Method Details
-
renderCallback
Description copied from interface:INodeRenderableCallback method that is invoked when thisNodeis being rendered.- Specified by:
renderCallbackin interfaceINodeRenderable<TElement, TGuiGraphics>- Overrides:
renderCallbackin classTElement- Parameters:
pencil- The rendering context.
-
of
public static final TTooltip of(@NotNull @NotNull net.minecraft.network.chat.Component text) throws NullPointerException Creates and returns a new simple textual tooltip element.- Parameters:
text- The tooltip text.- Throws:
NullPointerException- If the argument isnull.
-
of
A tooltip that shows the value of a given "custom stat" (also known as "general stat") in the statistics GUI.- Parameters:
stat- The custom/general stat.- Throws:
NullPointerException- If the argument isnull.
-
of
public static final TTooltip of(@NotNull @NotNull SubjectStats<?> stats) throws NullPointerException A tooltip that shows the player statistics for a givenSubjectStats.- Parameters:
stats- TheSubjectStatswhose statistics are to be shown.- Throws:
NullPointerException- If the argument isnull.
-
of
public static final TTooltip of(@NotNull @NotNull SubjectStats<?> stats, boolean showItemDescription) throws NullPointerException A tooltip that shows the player statistics for a givenSubjectStats.- Parameters:
stats- TheSubjectStatswhose statistics are to be shown.showItemDescription- Whether to include texts from Item Descriptions where possible.- Throws:
NullPointerException- If the argument isnull.
-