Class TDemoBackgroundElement
java.lang.Object
io.github.thecsdev.tcdcommons.api.client.gui.TElement
io.github.thecsdev.tcdcommons.api.client.gui.other.TDemoBackgroundElement
- All Implemented Interfaces:
TParentElement
,ITooltipProvider
,IEnableStateProvider
A
TPanelElement
that looks like the one seen in the game's menus.-
Nested Class Summary
Nested classes/interfaces inherited from class io.github.thecsdev.tcdcommons.api.client.gui.TElement
TElement.TElementEvent_ChildAR, TElement.TElementEvent_ContextMenu, TElement.TElementEvent_Moved, TElement.TElementEvent_ParentChanged, TElement.TElementEvent_Resized
-
Field Summary
Modifier and TypeFieldDescriptionprotected final float[]
static final net.minecraft.util.Identifier
Fields inherited from class io.github.thecsdev.tcdcommons.api.client.gui.TElement
alpha, eChildAdded, eChildRemoved, eContextMenu, eMoved, eParentChanged, eResized, height, SP_ALL, SP_INVOKE_EVENT, SP_MOVE_CHILDREN, SP_RELATIVE, SP_UPDATE_TOPMOST, SS_ALL, SS_INVOKE_EVENT, SS_UPDATE_TOPMOST, tooltip, tooltipPositioner, width, x, y, zOffset
Fields inherited from interface io.github.thecsdev.tcdcommons.api.client.gui.TParentElement
MAX_CHILD_NESTING_DEPTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal float[]
getColor()
Returns the array containing the RGBA values of the color.void
render
(TDrawContext pencil) Renders this GUI element on the screen.void
setColor
(float[] rgbaColor) Sets the color using an array that contains RGBA color values.Methods inherited from class io.github.thecsdev.tcdcommons.api.client.gui.TElement
canBeAddedTo, createContextMenu, getAlpha, getChildren, getEnabled, getHeight, getItemRenderer, getParent, getParentTElement, getParentTScreen, getTextRenderer, getTooltip, getTooltipPositioner, getWidth, getX, getY, getZIndex, getZOffset, input, isDragging, isEnabled, isEnabledAndVisible, isFocusable, isFocused, isFocusedOrHovered, isHoverable, isHovered, isVisible, move, moveChildren, next, postRender, previous, setAlpha, setPosition, setPosition, setSize, setSize, setTooltip, setZOffset, tick, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.github.thecsdev.tcdcommons.api.client.gui.TParentElement
addChild, addChild, clearChildren, findChild, findLastChild, findParent, findParentTElement, forEachChild, getEndX, getEndY, input, removeChild, removeChild
-
Field Details
-
TEX_BACKGROUND
public static final net.minecraft.util.Identifier TEX_BACKGROUND -
color
protected final float[] color
-
-
Constructor Details
-
TDemoBackgroundElement
public TDemoBackgroundElement(int x, int y, int width, int height)
-
-
Method Details
-
getColor
public final float[] getColor()Returns the array containing the RGBA values of the color. -
setColor
Sets the color using an array that contains RGBA color values.- Parameters:
rgbaColor
- The new color.- Throws:
NullPointerException
IllegalArgumentException
-
render
Description copied from interface:TParentElement
Renders this GUI element on the screen.- Specified by:
render
in interfaceTParentElement
- Specified by:
render
in classTElement
- Parameters:
pencil
- TheTDrawContext
.
-