Record Class RectWidget
java.lang.Object
java.lang.Record
dev.pfaff.altargui.widgets.RectWidget
- Record Components:
colorRgba
- the RGBA colorRgba of the widgettex
- the texture of the widget
- All Implemented Interfaces:
Widget
public record RectWidget(int colorRgba, @Nullable LoadableTex2d tex)
extends Record
implements Widget
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RectWidget
static final RectWidget
static final RectWidget
Fields inherited from interface dev.pfaff.altargui.Widget
EMPTY_ARRAY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncolor()
static RectWidget
int
Returns the value of thecolorRgba
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull WidgetInstance
<RectWidget> Instantiates an instance of the widget.@Nullable LoadableTex2d
tex()
Returns the value of thetex
record component.static RectWidget
textured
(LoadableTex2d tex) static RectWidget
textured
(LoadableTexture tex) static RectWidget
textured
(LoadableTexture tex, Tex2d coords) final String
toString()
Returns a string representation of this record class.withTexture
(LoadableTex2d tex) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface dev.pfaff.altargui.Widget
atAbsolutePosition, atAlignment, atCenter, atRelativePosition, expand, expandHeight, expandWidth, withAbsoluteHeight, withAbsoluteSize, withAbsoluteWidth, withAspectRatio, withAspectRatio, withAspectRatio, withBackground, withBackgroundColor, withBackgroundTexture, withBorder, withHorizontalMargin, withHorizontalMargin, withId, withKey, withMargin, withMargin, withMarginBottom, withMarginEnd, withMarginStart, withMarginTop, withMultiChildAttributes, withSymmetricMargin, withTooltip, withVerticalMargin, withVerticalMargin, wrap
-
Field Details
-
TRANSPARENT
-
GENERIC_HUD_BACKGROUND
-
GENERIC_HEAVY_HUD_BACKGROUND
-
-
Constructor Details
-
Method Details
-
colored
- Parameters:
color
- ARGB
-
textured
-
textured
-
textured
-
instantiate
Description copied from interface:Widget
Instantiates an instance of the widget.- Specified by:
instantiate
in interfaceWidget
-
color
-
withColor
-
withTexture
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
colorRgba
-
tex
-