Class: Rectangle

olympe.ui.std. Rectangle

A Rectangle is a UI element that displays a simple rectangle of the specified width and height.

Example

const rect = new olympe.ui.std.Rectangle(new olympe.df.Vector2(50, 25))
  .setPosition(new Vector2(50, 250))
  .setBorder(5, olympe.df.Color.white());

Creates a Rectangle 50 pixels wide, 25 pixels high and with a white border 5 pixels wide:

rect


new Rectangle( [dimension])

Creates an instance of Rectangle.

Parameters:
Name Type Argument Description
dimension olympe.df.PVector2 <optional>

The dimension (w, h) for this Rectangle.

Methods


<package> getUIProxyLayer()

Returns:

Proxified UI object Layer

Type
olympe.uiapi.std.Layer