Table of Contents

Interface IMultiSelectable

Namespace
Fallencake.UI
Assembly
Fallencake.UI.dll

Defines the contract for UI controls that support multiple coordinated graphic transitions (color tinting, sprite swapping, and CanvasGroup fading).

public interface IMultiSelectable

Properties

ColorableGraphics

Collection of colorable graphics taking part in state-based color transitions.

List<ColorableGraphic> ColorableGraphics { get; set; }

Property Value

List<ColorableGraphic>

SelectableTransition

The transition mode applied when the selection state changes.

SelectableTransition SelectableTransition { get; set; }

Property Value

SelectableTransition

SwappableCanvasGroupe

Settings bundle that drives CanvasGroup-based fading during state transitions.

SwappableCanvasGroup SwappableCanvasGroupe { get; set; }

Property Value

SwappableCanvasGroup

SwappableGraphics

Collection of swappable sprites taking part in state-based sprite transitions.

List<SwappableSprite> SwappableGraphics { get; set; }

Property Value

List<SwappableSprite>

Methods

AddColorableGraphic(Graphic, SelectionColorBlock)

Creates and adds a ColorableGraphic configured with a target and color block.

ColorableGraphic AddColorableGraphic(Graphic target, SelectionColorBlock colors)

Parameters

target Graphic

The UnityEngine.UI.Graphic to be color-tinted on state changes.

colors SelectionColorBlock

The SelectionColorBlock defining colors and timings.

Returns

ColorableGraphic

The created ColorableGraphic.

AddColorableGraphic(Graphic, Color, Color, Color, Color, Color, float, float)

Creates and adds a ColorableGraphic using explicit state colors.

ColorableGraphic AddColorableGraphic(Graphic target, Color normal, Color highlighted, Color pressed, Color selected, Color disabled, float colorMultiplier = 1, float fadeDuration = 0.1)

Parameters

target Graphic

The UnityEngine.UI.Graphic to be color-tinted.

normal Color

Color for Normal state.

highlighted Color

Color for Highlighted state.

pressed Color

Color for Pressed state.

selected Color

Color for Selected state.

disabled Color

Color for Disabled state.

colorMultiplier float

Multiplier applied to colors.

fadeDuration float

Color transition duration in seconds.

Returns

ColorableGraphic

The created ColorableGraphic.

AddNewColorableGraphics()

Adds a new ColorableGraphic entry to ColorableGraphics.

void AddNewColorableGraphics()

AddNewSwappableSprite()

Adds a new SwappableSprite entry to SwappableGraphics.

void AddNewSwappableSprite()

AddSwappableSprite(Graphic, SelectionSpriteState)

Creates and adds a SwappableSprite configured with a target and sprite state.

SwappableSprite AddSwappableSprite(Graphic target, SelectionSpriteState spriteState)

Parameters

target Graphic

The UnityEngine.UI.Graphic whose sprite will be swapped.

spriteState SelectionSpriteState

The SelectionSpriteState defining sprites per state.

Returns

SwappableSprite

The created SwappableSprite.

AddSwappableSprite(Image, Sprite, Sprite, Sprite, Sprite)

Creates and adds a SwappableSprite using explicit state sprites.

SwappableSprite AddSwappableSprite(Image targetImage, Sprite highlighted, Sprite pressed, Sprite selected, Sprite disabled)

Parameters

targetImage Image

The UnityEngine.UI.Image to receive swapped sprites.

highlighted Sprite

Sprite for Highlighted state.

pressed Sprite

Sprite for Pressed state.

selected Sprite

Sprite for Selected state.

disabled Sprite

Sprite for Disabled state.

Returns

SwappableSprite

The created SwappableSprite.

SetFadingCanvasGroups(CanvasGroup, CanvasGroup, CanvasGroup, CanvasGroup, CanvasGroup, float)

Configures SwappableCanvasGroupe with CanvasGroups per state and fade duration.

void SetFadingCanvasGroups(CanvasGroup normal, CanvasGroup highlighted, CanvasGroup pressed, CanvasGroup selected, CanvasGroup disabled, float fadeDuration = 0.1)

Parameters

normal CanvasGroup

CanvasGroup for Normal state.

highlighted CanvasGroup

CanvasGroup for Highlighted state.

pressed CanvasGroup

CanvasGroup for Pressed state.

selected CanvasGroup

CanvasGroup for Selected state.

disabled CanvasGroup

CanvasGroup for Disabled state.

fadeDuration float

Alpha fade duration in seconds.