Class ModularModalWindow
- Namespace
- Fallencake.UI
- Assembly
- Fallencake.UI.dll
Simple modal window with title, content, optional icon and confirm/cancel buttons. Supports animated show/hide via PopupTweenAnimator.
[AddComponentMenu("Modular UI/Modal Window")]
public class ModularModalWindow : MonoBehaviour
- Inheritance
-
objectObjectComponentBehaviourMonoBehaviourModularModalWindow
Fields
OnCancel
public UnityEvent OnCancel
Field Value
- UnityEvent
OnConfirm
public UnityEvent OnConfirm
Field Value
- UnityEvent
OnHide
public UnityEvent OnHide
Field Value
- UnityEvent
OnShow
public UnityEvent OnShow
Field Value
- UnityEvent
Properties
ContentLabel
Content text label.
public TMP_Text ContentLabel { get; }
Property Value
- TMP_Text
Icon
Icon image reference.
public Image Icon { get; }
Property Value
- Image
IconSprite
Default icon sprite.
public Sprite IconSprite { get; }
Property Value
- Sprite
IsOn
Whether the window is currently shown.
public bool IsOn { get; }
Property Value
- bool
TitleLabel
Title text label.
public TMP_Text TitleLabel { get; }
Property Value
- TMP_Text
Type
Content type used to render UI (custom or modular).
public ModularModalWindow.ContentType Type { get; }
Property Value
Methods
Close()
Closes the window with animation.
public void Close()
Open()
Opens the window with animation.
public void Open()
UpdateUI()
Updates labels, icons and button visibility based on current settings.
public void UpdateUI()