Class TButtonWidget.Paintable
java.lang.Object
com.thecsdev.common.scene.Node<TElement>
com.thecsdev.commonmc.api.client.gui.TElement
com.thecsdev.commonmc.api.client.gui.widget.TClickableWidget
com.thecsdev.commonmc.api.client.gui.widget.TButtonWidget
com.thecsdev.commonmc.api.client.gui.widget.TButtonWidget.Paintable
- All Implemented Interfaces:
INode<TElement>, INodeBounded<TElement,Bounds2i>, INodeRenderable<TElement, TGuiGraphics>, Iterable<TElement>, Collection<TElement>
- Enclosing class:
TButtonWidget
TButtonWidget implementation that allows you to customize its background
and outline colors.-
Nested Class Summary
Nested classes/interfaces inherited from class TButtonWidget
TButtonWidget.Flat, TButtonWidget.Paintable, TButtonWidget.Transparent -
Field Summary
Fields inherited from class TButtonWidget
LBL_PAD_X, LBL_PAD_YFields inherited from class TClickableWidget
eClicked, ONCLICK_SOUNDFields inherited from class TElement
eInitialized -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal IntegerPropertyIntegerPropertyfor the background color of thisTButtonWidget.Paintablebutton.final IntegerPropertyIntegerPropertyfor the outline color of thisTButtonWidget.Paintablebutton when this buttonTElement.isFocused().final IntegerPropertyIntegerPropertyfor the outline color of thisTButtonWidget.Paintablebutton.final voidpostRenderCallback(@NotNull TGuiGraphics pencil) Callback method that is invoked after thisNodeand all of their children have been rendered.final voidrenderCallback(@NotNull TGuiGraphics pencil) Callback method that is invoked when thisNodeis being rendered.Methods inherited from class TButtonWidget
getLabel, initCallbackMethods inherited from class TClickableWidget
click, clickCallback, dragEndCallback, dragStartCallback, enabledProperty, focusLostCallback, getCursor, hoverGainedCallback, inputCallback, isFocusable, pressedPropertyMethods inherited from class TElement
addRel, boundsProperty, clearAndInit, clipsDescendantsProperty, contextMenuProperty, findElementAt, focusableProperty, focusGainedCallback, forEachVisible, getBaseType, getBounds, getClient, getContentBounds, getSelf, getTooltip, hoverableProperty, hoverLostCallback, invalidateTooltipCache, isFocused, isHoverable, isHovered, isHoveredOrFocused, isVisible, move, moveChildren, moveTo, 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
-
Paintable
public Paintable() -
Paintable
public Paintable(int backgroundColor) -
Paintable
public Paintable(int backgroundColor, int outlineColor) -
Paintable
public Paintable(int backgroundColor, int outlineColor, int focusOutlineColor)
-
-
Method Details
-
backgroundColorProperty
IntegerPropertyfor the background color of thisTButtonWidget.Paintablebutton. -
outlineColorProperty
IntegerPropertyfor the outline color of thisTButtonWidget.Paintablebutton. -
focusedOutlineColorProperty
IntegerPropertyfor the outline color of thisTButtonWidget.Paintablebutton when this buttonTElement.isFocused(). -
renderCallback
Description copied from interface:INodeRenderableCallback method that is invoked when thisNodeis being rendered.- Specified by:
renderCallbackin interfaceINodeRenderable<TElement, TGuiGraphics>- Overrides:
renderCallbackin classTButtonWidget- Parameters:
pencil- The rendering context.
-
postRenderCallback
Description copied from interface:INodeRenderableCallback method that is invoked after thisNodeand all of their children have been rendered.- Specified by:
postRenderCallbackin interfaceINodeRenderable<TElement, TGuiGraphics>- Overrides:
postRenderCallbackin classTClickableWidget- Parameters:
pencil- The rendering context.
-