Class Selector
- Namespace
- Fallencake.UI
- Assembly
- Fallencake.UI.dll
Simple selector component that updates text, icons, layouts, and indicators based on the selected item.
public class Selector : BaseSelector, ISaveable
- Inheritance
-
objectObjectComponentBehaviourMonoBehaviourSelector
- Implements
- Inherited Members
Methods
CreateNewItem(string, Sprite)
public void CreateNewItem(string name, Sprite icon = null)
Parameters
namestringiconSprite
NextItem()
public void NextItem()
PreviousItem()
public void PreviousItem()
RemoveItem(string)
public void RemoveItem(string itemName)
Parameters
itemNamestring
SelectItem(int)
Selects an item by index and updates visuals in derived implementations.
public override void SelectItem(int index)
Parameters
indexintZero-based index of the item to select.
SelectItem(int, bool)
Selects an item and optionally plays transition animation.
public void SelectItem(int index, bool playAnimation = true)
Parameters
indexintZero-based index of the item to select.
playAnimationboolWhether to play selection animation.
UpdateContentLayout()
protected override void UpdateContentLayout()
UpdateIndicators()
protected override void UpdateIndicators()
UpdateLabelAndIcon()
protected override void UpdateLabelAndIcon()