![]() |
FirstModulAR 0.1.0
|
An object that can hold a widget. Allows the ability to move widgets around between various containers, and to lock the widget to prevent moving. More...
Public Member Functions | |
| virtual WidgetContainer | Init (Widget widget, Vector2 size, bool disableCollidersOverride=false, float scaleFactor=-1, bool disableInitEvent=false) |
| Initializes the widget container. | |
| void | UpdateSize (Vector2 size) |
| Sets the size of the widget container. | |
| virtual void | DetachWidget () |
| Detaches the widget from the widget container. | |
| void | ToggleLockedState () |
| Toggles the locked state of the widget container, which determines if the widget can be removed or added. | |
| bool | TryMove () |
| Tries to move the widget. | |
Protected Member Functions | |
| virtual void | Awake () |
| void | CreateBorder () |
| virtual void | Update () |
Protected Attributes | |
| Widget | widget |
| Vector2 | size = Vector2.one |
| Material | borderMaterial |
| LineRenderer | border |
| bool | locked |
Properties | |
| Widget | Widget [get] |
| Vector2 | Size [get] |
| float | ScaleFactor [get] |
| LineRenderer | Border [get] |
| bool | HoverLeft [get] |
| bool | HoverRight [get] |
| bool | Hover [get] |
| bool | Locked [get] |
Events | |
| static Action< WidgetContainer > | OnInit |
An object that can hold a widget. Allows the ability to move widgets around between various containers, and to lock the widget to prevent moving.
|
inlineprotectedvirtual |
Reimplemented in FMAR.UI.Widgets.Tab.
|
inlineprotected |
|
inlinevirtual |
Detaches the widget from the widget container.
Reimplemented in FMAR.UI.Widgets.FloatingDisplay, FMAR.UI.Widgets.GridSlot, and FMAR.UI.Widgets.TabbedDisplaySlot.
|
inlinevirtual |
Initializes the widget container.
| widget | The widget to place into the widget container. |
| size | The size of the widget container. |
| disableCollidersOverride | Whether to disable the colliders. |
| scaleFactor | The scale factor to use. |
| disableInitEvent | Whether to disable the init event. |
Reimplemented in FMAR.UI.Widgets.GridSlot, and FMAR.UI.Widgets.TabbedDisplaySlot.
|
inline |
Toggles the locked state of the widget container, which determines if the widget can be removed or added.
|
inline |
Tries to move the widget.
|
inlineprotectedvirtual |
Reimplemented in FMAR.UI.Widgets.FloatingDisplay.
|
inline |
Sets the size of the widget container.
| size | The new size of the widget container. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
static |