Table of Contents

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
object
Object
Component
Behaviour
MonoBehaviour
Selector
Implements
Inherited Members

Methods

CreateNewItem(string, Sprite)

public void CreateNewItem(string name, Sprite icon = null)

Parameters

name string
icon Sprite

NextItem()

public void NextItem()

PreviousItem()

public void PreviousItem()

RemoveItem(string)

public void RemoveItem(string itemName)

Parameters

itemName string

SelectItem(int)

Selects an item by index and updates visuals in derived implementations.

public override void SelectItem(int index)

Parameters

index int

Zero-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

index int

Zero-based index of the item to select.

playAnimation bool

Whether to play selection animation.

UpdateContentLayout()

protected override void UpdateContentLayout()

UpdateIndicators()

protected override void UpdateIndicators()

UpdateLabelAndIcon()

protected override void UpdateLabelAndIcon()