3.8. C# UI.Components¶
3.8.1. UiCollapsible.cs¶
-
class
UI.Components.UiCollapsible
: public MonoBehaviour¶ UI Component header that hides items when clicked/toggled.
Public Functions
-
void
AddItem
(GameObject item, bool setAsLastSibling = true)¶ Add an item to the group, visibility is immediately set
- Parameters
setAsLastSibling
: Add the item to the end of the group. Set this to false to have an item collapse/hide with this group but leave it in the place/sibling that it is.
-
void
ToggleVisibility
()¶ Called from UI to change the visibility of the group’s items
-
void
SetVisibility
(bool value)¶ Change the visibility of the group’s items.
-
void
Remove
(GameObject item)¶ Remove an item from the collapsible. Will not delete the item.
-
void
RemoveLast
()¶ Remove the last item from the group.
Private Functions
-
void
OnEnable
()¶
Private Members
-
readonly List<GameObject>
_items
= new List<GameObject>()¶
-
bool
_visible
= true¶
-
int
_lastSiblingIndex
¶
-
void
3.8.2. UiIconAction.cs¶
-
class
UI.Components.UiIconAction
: public MonoBehaviour¶ UI Component with two buttons, one icon sized.
3.8.3. UiToggleAction.cs¶
-
class
UI.Components.UiToggleAction
: public MonoBehaviour¶ A toggle and button UI element. The toggle and button are independent by default
3.8.4. UiSelection.cs¶
-
class
UI.Components.UiSelection
: public MonoBehaviour¶ UI for one selection of a mesh (one row)
Public Functions
-
void
Initialize
(int selectionId, UiCollapsible uiCollapsible, LibiglBehaviour behaviour, IList<UiSelection> selections)¶
-
unsafe void
ToggleVisible
()¶
-
unsafe void
Clear
(bool forceDelete = false)¶ Clears the selection and deletes it if it is already empty and the last one
- Parameters
forceDelete
: Delete this even if the selection is not empty. Still needs to be the last selection
-
unsafe void
UpdateText
()¶
-
void
ToggleEditSprite
(bool isActive)¶
-
void
3.8.5. UiSelectionMode.cs¶
-
class
UI.Components.UiSelectionMode
: public MonoBehaviour¶ Handles the selection mode UI, onclick behaviour. There are several modes from SelectionMode as well as the newSelectionOnDrawBtn where a new selection is added on each stroke.
Public Members
Private Functions
-
void
SetMode
(SelectionMode mode)¶
-
void
ToggleNewSelectionOnDraw
()¶
-
void
RepaintNewSelectionOnDrawBtn
()¶
-
void
ToggleDiscardSelectionOnDraw
()¶
-
void
RepaintDiscardSelectionOnDrawBtn
()¶
Private Members
-
SelectionMode
_mode
¶
-
void
3.8.6. UiPivotMode.cs¶
-
class
UI.Components.UiPivotMode
: public MonoBehaviour¶ Similar to UiSelectionMode, effectively an enum field.
3.8.7. UiProgressIcon.cs¶
-
class
UI.Components.UiProgressIcon
: public MonoBehaviour¶ Handles showing the progress icon and animating it based on the PreExecute and PostExecute. This indicates the state of the libigl thread.
Private Functions
-
void
Start
()¶
-
IEnumerator
ShowProgressAfterTime
()¶ Coroutine that animates progress icon over time. Can be stopped
-
void