FrameΒΆ

Inherited: Widget

DescriptionΒΆ

The Frame class represents a graphical frame or border used in user interfaces. It is designed to visually group or contain other UI elements, providing a clear separation or visual boundary. The frame can have customizable corners, border width, and border color, making it a versatile element for organizing and structuring content within an application.

Public MethodsΒΆ

Vector4

backgroundColor () const

Sprite *

backgroundImage () const

Vector4

borderColor () const

void

boundChanged (const Vector2 & size)

Vector4

corners () const

void

setBackgroundColor (const Vector4 & color)

void

setBackgroundImage (Sprite * image)

void

setBorderColor (const Vector4 & color)

void

setCorners (const Vector4 & corners)

Static MethodsΒΆ

None

Methods DescriptionΒΆ

Vector4 Frame::backgroundColor () const

Returns the color of the frame to be drawn.

See also setBackgroundColor().


Sprite * Frame::backgroundImage () const

Returns background image.

See also setBackgroundImage().


Vector4 Frame::borderColor () const

Returns border color of the frame.

See also setBorderColor().


void Frame::boundChanged (Vector2 & size)

Reimplements: Widget::boundChanged(const Vector2 &size).

Callback method called when the size of the frame changed. Updates material properties based on corner radius and border width.


Vector4 Frame::corners () const

Returns the corners radiuses of the frame.

See also setCorners().


void Frame::setBackgroundColor (Vector4 & color)

Changes the color of the frame to be drawn.

See also backgroundColor().


void Frame::setBackgroundImage (Sprite * image)

Sets background image.

See also backgroundImage().


void Frame::setBorderColor (Vector4 & color)

Sets the border color of the frame.

See also borderColor().


void Frame::setCorners (Vector4 & corners)

Sets the corners radiuses of the frame.

See also corners().