Script documentation
List.cs in TinyGiantStudio.Text namespace
Last updated
Was this helpful?
List.cs in TinyGiantStudio.Text namespace
Last updated
Was this helpful?
If anything except method names starts with a capital letter, it's a property. Read the to understand what the terms like "press complete" mean in the asset.
selectedItem
int
autoFocusOnStart
bool
If set to true, the list is focused on awake. The list is scrollable with a keyboard when focused.
autoFocusFirstItem
bool
Selects first item in the list when focused.
UpdateList ()
Updates the positioning of items in the list if it has a layout group.
Focus ()
Toggles the focus on the list. When a list is focused, it can be scrolled with a keyboard/controller, if that is enabled.
Focus (bool enable)
Enables/disables focus depending on the bool passed as a parameter. When a list is focused, it can be scrolled with a keyboard/controller, if that is enabled.
Focus (bool enable, bool delay)
If the second parameter delay is set to true, the list is focused after a single frame. Enables/disables focus depending on the bool passed as the first parameter. When a list is focused, it can be scrolled with a keyboard/controller, if that is enabled.
SelectItem (int number)
Processes the selected item for the list. Doesn't let the selected item know it was selected. Call the AlertSelectedItem(int number) to update the UI item.
AlertSelectedItem (int number)
Alerts the list item that was selected. Doesn't alert the list. Call the SelectItem (int number) to update the UI item.
UnselectItem(int number)
Unselects the child in the list whose index was passed as parameter.
UnselectEverything ()
Unselects everything.
UnselectEverythingExceptSelected ()
Unselects everything except the selected item. This is useful for handling UI with random states being added to the list.
UnselectEverythingDontChangeSelectedItemValue ()
Unselects everything but does not reset the "selectedItem" number. Keeping the selected item value means the previously selected item can still be pressed after selected and scrolling via keyboard continues from the previously selected one instead of starting from 0
PressSelectedItem ()
PresstItem (int number)
Styles control child element visuals.
UseStyle
bool
If set to false, disables all style controls from this list.
UseNormalItemVisual
bool
If set to false, disables normal style from being applied from this list. An individual element's own style is used in that case.
NormalTextSize
Vector3
NormalTextMaterial
Material
NormalBackgroundMaterial
Material
UseSelectedItemVisual
bool
If set to false, disables the 'selected' style from being applied from the list. An individual element's own style is used in that case.
SelectedTextSize
Vector3
SelectedTextMaterial
Material
SelectedBackgroundMaterial
Material
UsePressedItemVisual
bool
If set to false, disables the 'pressed' style from being applied from the list. An individual element's own style is used in that case.
PressedTextSize
Vector3
PressedTextMaterial
Material
PressedBackgroundMaterial
Material
holdPressedVisualFor
float
UseDisabledItemVisual
bool
If set to false, disables the 'pressed' style from being applied from the list. An individual element's own style is used in that case.
DisabledTextSize
Vector3
DisabledTextMaterial
Material
DisabledBackgroundMaterial
Material
UpdateStyle ()
Updates the style options of all child UI elements.
Note: The term "unselect" here is used instead of "normal" like style states because these modules are not called when the list items enter the normal first time, but instead, enter a "normal" state after being "selected".
useModules
bool
If set to false, disables all modules on this list.
ignoreChildModules
bool
If set to false, disables all modules on the list items like buttons.
unSelectedModuleContainers
applyUnSelectedModuleContainers
bool
ignoreChildUnSelectedModuleContainers
bool
If set to true, if any child element like buttons have Un-Select Modules, they are ignored.
selectedModuleContainers
applySelectedModuleContainers
bool
ignoreChildSelectedModuleContainers
bool
If set to true, if any child element like buttons have selected Modules, they are ignored.
beingPressedModuleContainers
ignoreChildUnSelectedModuleContainers
bool
ignoreChildBeingPressedModuleContainers
bool
pressCompleteModuleContainers
applyPressCompleteModuleContainers
bool
ignoreChildPressCompleteModuleContainers
bool
Adds a new empty module container to the ModuleContainer list passed as a parameter.
ScrollUp ()
ScrollDown ()
ScrollLeft ()
ScrollRight ()
Renamed "onSelect" to "selected" for code consistency with rest of the asset.
onSelectModuleContainers
to selectedModuleContainers
applyOnSelectModuleContainers
to applySelectModuleContainers
ignoreChildOnSelectModuleContainers
to ignoreChildSelectedModuleContainers
Renamed "onPress" to "beingPressed" for clarity about the fact that this is called constantly while the UI element is being pressed.
onPressModuleContainers
to beingPressedModuleContainers
applyOnPressModuleContainers
to applyBeingPressedModuleContainers
ignoreChildOnPressModuleContainers
to ignoreChildBeingPressedModuleContainers
Renamed "onClick" to "pressComplete" for clarity about what it does.
onClickModuleContainers
to pressCompleteModuleContainers
applyOnClickModuleContainers
to applyPressCompleteModuleContainers
ignoreChildOnClickModuleContainers
to ignoreChildPressCompleteModuleContainers
Renamed "unSelect" to "unSelected" for consistency with rest of the asset.
unSelectModuleContainers
to unSelectedModuleContainers
applyUnSelectModuleContainers
to applyUnSelectedModuleContainers
ignoreChildUnSelectModuleContainers
to ignoreChildUnSelectedModuleContainers
EmptyEffect(List<> moduleList)
For or
For or