FirstModulAR 0.1.0
Loading...
Searching...
No Matches
FMAR.UI.Widgets.GridSlot Class Reference

A container that widgets can be placed into, in a grid format. More...

Inheritance diagram for FMAR.UI.Widgets.GridSlot:
FMAR.UI.Widgets.WidgetContainer FMAR.UI.Widgets.TabbedDisplaySlot

Public Member Functions

override WidgetContainer Init (Widget widget, Vector2 size, bool disableCollidersOverride=false, float scaleFactor=-1, bool disableInitEvent=false)
 Initializes the grid slot.
 
override void DetachWidget ()
 Detaches the widget from the grid slot and destroys the game object.
 
- Public Member Functions inherited from FMAR.UI.Widgets.WidgetContainer
void UpdateSize (Vector2 size)
 Sets the size of 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.
 

Public Attributes

bool acceptsMany
 

Events

static Action< GridSlotOnGridSlotInit
 Event triggered when the grid slot is initialized.
 
- Events inherited from FMAR.UI.Widgets.WidgetContainer
static Action< WidgetContainerOnInit
 

Additional Inherited Members

- Protected Member Functions inherited from FMAR.UI.Widgets.WidgetContainer
virtual void Awake ()
 
void CreateBorder ()
 
virtual void Update ()
 
- Protected Attributes inherited from FMAR.UI.Widgets.WidgetContainer
Widget widget
 
Vector2 size = Vector2.one
 
Material borderMaterial
 
LineRenderer border
 
bool locked
 
- Properties inherited from FMAR.UI.Widgets.WidgetContainer
Widget Widget [get]
 
Vector2 Size [get]
 
float ScaleFactor [get]
 
LineRenderer Border [get]
 
bool HoverLeft [get]
 
bool HoverRight [get]
 
bool Hover [get]
 
bool Locked [get]
 

Detailed Description

A container that widgets can be placed into, in a grid format.

Member Function Documentation

◆ DetachWidget()

override void FMAR.UI.Widgets.GridSlot.DetachWidget ( )
inlinevirtual

Detaches the widget from the grid slot and destroys the game object.

Reimplemented from FMAR.UI.Widgets.WidgetContainer.

Reimplemented in FMAR.UI.Widgets.TabbedDisplaySlot.

◆ Init()

override WidgetContainer FMAR.UI.Widgets.GridSlot.Init ( Widget widget,
Vector2 size,
bool disableCollidersOverride = false,
float scaleFactor = -1,
bool disableInitEvent = false )
inlinevirtual

Initializes the grid slot.

Parameters
widgetThe widget to place into the grid slot.
sizeThe size of the grid slot.
disableCollidersOverrideWhether to disable the colliders.
scaleFactorThe scale factor to use.
disableInitEventWhether to disable the init event.
Returns
This grid slot, as a WidgetContainer.

Reimplemented from FMAR.UI.Widgets.WidgetContainer.

Reimplemented in FMAR.UI.Widgets.TabbedDisplaySlot.

Member Data Documentation

◆ acceptsMany

bool FMAR.UI.Widgets.GridSlot.acceptsMany

Event Documentation

◆ OnGridSlotInit

Action<GridSlot> FMAR.UI.Widgets.GridSlot.OnGridSlotInit
static

Event triggered when the grid slot is initialized.


The documentation for this class was generated from the following file: