RectTransform

Inherited: None

Description

The ProgressBar class is designed to provide a graphical representation of progress with customizable appearance and range. It supports features such as setting the minimum and maximum values, adjusting the progress value, and specifying visual elements for background and progress indicator.

Public Methods

Vector4

border () const

RectTransform::SizePolicy

horizontalPolicy () const

RectTransform *

hoveredTransform (float x, float y)

bool

isHovered (float x, float y) const

Layout *

layout () const

Vector2

mapFromGlobal (float x, float y)

Vector4

margin () const

Vector2

maxAnchors () const

Vector2

minAnchors () const

bool

mouseTracking () const

Vector4

padding () const

Vector2

pivot () const

Vector4

scissorArea () const

void

setAnchors (const Vector2 & minimum, const Vector2 & maximum)

void

setBorder (const Vector4 & border)

void

setEnabled (bool enabled)

void

setHorizontalPolicy (RectTransform::SizePolicy policy)

void

setLayout (Layout * layout)

void

setMargin (const Vector4 & margin)

void

setMaxAnchors (const Vector2 & anchors)

void

setMinAnchors (const Vector2 & anchors)

void

setMouseTracking (bool tracking)

void

setPadding (const Vector4 & padding)

void

setPivot (const Vector2 & pivot)

void

setPosition (const Vector3 & position)

void

setSize (const Vector2 & size)

void

setVerticalPolicy (RectTransform::SizePolicy policy)

Vector2

size () const

Vector2

sizeHint () const

void

subscribe (Widget * widget)

void

unsubscribe (Widget * widget)

RectTransform::SizePolicy

verticalPolicy () const

Widget *

widget ()

Static Methods

None

Methods Description

Vector4 RectTransform::border () const

Returns the border width of the RectTransform. The Vector4 contains border widths in top, right, bottom and left order.

See also setBorder().


RectTransform::SizePolicy RectTransform::horizontalPolicy () const

Returns horizontal size policy.

See also setHorizontalPolicy().


RectTransform * RectTransform::hoveredTransform (float x, float y)

Returns the most top RectTransform in hierarchy wich contains the point with coodinates x and y. Returns null if no bounds.


bool RectTransform::isHovered (float x, float y) const

Returns true if the point with coordinates x and y is within the bounds, otherwise false.


Layout * RectTransform::layout () const

Returns the layout assigned to the RectTransform.

See also setLayout().


Vector2 RectTransform::mapFromGlobal (float x, float y)

Translates the global screen x and y coordinates to widget space.


Vector4 RectTransform::margin () const

Returns the margin offsets of the RectTransform. The Vector4 contains offsets in top, right, bottom and left order.

See also setMargin().


Vector2 RectTransform::maxAnchors () const

Returns the maximum anchors of the RectTransform.

See also setMaxAnchors().


Vector2 RectTransform::minAnchors () const

Returns the minimum anchors of the RectTransform.

See also setMinAnchors().


bool RectTransform::mouseTracking () const

Returns true if this area is interactable with mouse; otherwise returns false. Returns true by the default.

See also setMouseTracking().


Vector4 RectTransform::padding () const

Returns the padding offset of the RectTransform. The Vector4 contains padding offsets in top, right, bottom and left order.

See also setPadding().


Vector2 RectTransform::pivot () const

Returns the pivot point of the RectTransform.

See also setPivot().


Vector4 RectTransform::scissorArea () const

Returns the internal scissor area. All content outside of this are will not be rendered.


void RectTransform::setAnchors (Vector2 & minimum, Vector2 & maximum)

Sets both the minimum and maximum anchors of the RectTransform.


void RectTransform::setBorder (Vector4 & border)

Sets the top, right, bottom and left border width of the RectTransform.

See also border().


void RectTransform::setEnabled (bool enabled)

Reimplements: Component::setEnabled(bool enabled).

Sets current state of RectTransform to enabled or disabled.


void RectTransform::setHorizontalPolicy (RectTransform::SizePolicy policy)

Sets horizontal size policy.

See also horizontalPolicy().


void RectTransform::setLayout (Layout * layout)

Sets the layout for the RectTransform.

See also layout().


void RectTransform::setMargin (Vector4 & margin)

Sets the top, right, bottom and left margin offsets of the RectTransform.

See also margin().


void RectTransform::setMaxAnchors (Vector2 & anchors)

Sets the maximum anchors of the RectTransform.

See also maxAnchors().


void RectTransform::setMinAnchors (Vector2 & anchors)

Sets the minimum anchors of the RectTransform.

See also minAnchors().


void RectTransform::setMouseTracking (bool tracking)

Sets mouse tracking enabled or disabled.

See also mouseTracking().


void RectTransform::setPadding (Vector4 & padding)

Sets the top, right, bottom and left padding offsets of the RectTransform.

See also padding().


void RectTransform::setPivot (Vector2 & pivot)

Sets the pivot point of the RectTransform.

See also pivot().


void RectTransform::setPosition (Vector3 & position)

Reimplements: Transform::setPosition(const Vector3 &position).

Changes position of the Transform in local space.


void RectTransform::setSize (Vector2 & size)

Sets the size of the RectTransform.

See also size().


void RectTransform::setVerticalPolicy (RectTransform::SizePolicy policy)

Sets vertical size policy.

See also verticalPolicy().


Vector2 RectTransform::size () const

Returns the size of the associated UI element.

See also setSize().


Vector2 RectTransform::sizeHint () const

Returns the size recommended to contain all visible content.


void RectTransform::subscribe (Widget * widget)

Subscribes a widget to changes in the RectTransform.


void RectTransform::unsubscribe (Widget * widget)

Unsubscribes a widget from changes in the RectTransform.


RectTransform::SizePolicy RectTransform::verticalPolicy () const

Returns vertical size policy.

See also setVerticalPolicy().


Widget * RectTransform::widget ()

Returns the first widget associated with this rect transform.