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
SwappableCanvasGroupe
Settings bundle that drives CanvasGroup-based fading during state transitions.
SwappableCanvasGroup SwappableCanvasGroupe { get; set; }
Property Value
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
targetGraphicThe UnityEngine.UI.Graphic to be color-tinted on state changes.
colorsSelectionColorBlockThe 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
targetGraphicThe UnityEngine.UI.Graphic to be color-tinted.
normalColorColor for Normal state.
highlightedColorColor for Highlighted state.
pressedColorColor for Pressed state.
selectedColorColor for Selected state.
disabledColorColor for Disabled state.
colorMultiplierfloatMultiplier applied to colors.
fadeDurationfloatColor 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
targetGraphicThe UnityEngine.UI.Graphic whose sprite will be swapped.
spriteStateSelectionSpriteStateThe 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
targetImageImageThe UnityEngine.UI.Image to receive swapped sprites.
highlightedSpriteSprite for Highlighted state.
pressedSpriteSprite for Pressed state.
selectedSpriteSprite for Selected state.
disabledSpriteSprite 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
normalCanvasGroupCanvasGroup for Normal state.
highlightedCanvasGroupCanvasGroup for Highlighted state.
pressedCanvasGroupCanvasGroup for Pressed state.
selectedCanvasGroupCanvasGroup for Selected state.
disabledCanvasGroupCanvasGroup for Disabled state.
fadeDurationfloatAlpha fade duration in seconds.