Project Arrhythmia
A video game developed by Vitamin Games.
Loading...
Searching...
No Matches
UIElement Class Referenceabstract

Abstract base class for UI elements in the project. More...

+ Inheritance diagram for UIElement:

Public Member Functions

void InitTweener ()
 
void ClearGraphics ()
 
void InitGraphics ()
 
void Awake ()
 
IEnumerator DelayedAwake ()
 
void Show (float _delay)
 Show after set delay.
 
void Show (float _delayMin, float _delayMax)
 Show after randomized delay.
 
void Show ()
 Show UIElement.
 
void ShowCustom (float _time)
 Show UIElement.
 
void Hide ()
 Used on Close of Popup.
 
void HideCustom (float _time)
 Close UIElement.
 
void HideInstant ()
 
void ShowInstant ()
 
void Stutter ()
 
void PlayGlitch (float _start, float _end, float _duration)
 
void Glitch (float _value)
 
void SubGlitch (Graphic _graphic)
 
void SubGlitchTo (Graphic _graphic, float _to, float _duration=ANIMATE_GLITCH_TIME)
 
StringBuilder GetSB ()
 
void SubGlitch (Graphic _graphic, float _value, float _valueOffset=0, bool encapsulate=true, bool onlyGlitchNew=false)
 
void ExecUIEvent (string _func)
 
void OpenLink (string _url)
 
void UpdateSelection (GameObject _selection)
 
void ToggleGraphics (bool _state)
 

Public Attributes

bool AutoShow = false
 
bool AutoHide = false
 
Graphic[] graphics
 
Graphic[] subGraphics
 

Static Public Attributes

const float ANIMATE_IN_TIME = 0.3f
 
const float ANIMATE_GLITCH_TIME = 0.3f
 
const float ANIMATE_OUT_TIME = 0.3f
 

Protected Member Functions

void OnShow ()
 Wrapper for awake to ensure it happens at the correct time (cut down on race conditions)
 
void DisableElement ()
 Wrapper for awake to ensure it happens at the correct time (cut down on race conditions)
 
virtual void OnDestroyElement ()
 Wrapper for Destroy to ensure it happens at the correct time (cut down on race conditions)
 
virtual void OnAwake ()
 Wrapper for awake to ensure it happens at the correct time (cut down on race conditions)
 
void OnGlitch (float _value)
 

Protected Attributes

Dictionary< TextMeshProUGUI, GameObjectLocalizer > localizers = new Dictionary<TextMeshProUGUI, GameObjectLocalizer>()
 
Dictionary< TextMeshProUGUI, LocalizeStringEvent > localizersStr = new Dictionary<TextMeshProUGUI, LocalizeStringEvent>()
 
float GlitchVal = 1
 

Properties

float GlitchLevel [get]
 

Private Member Functions

void OnDestroy ()
 
IEnumerator DelayedShow (float _delay)
 Show after set delay.
 
void ApplyLocale (TextMeshProUGUI _ui, System.Action _callback)
 
void GetGraphics ()
 
string GenerateRandomFiller (char _letter, float _value)
 
string GenerateRandomFiller ()
 

Private Attributes

MultiElementTargetGraphics multiGraphics
 
Tweener activeTweener
 
Tweener activeSubTweener
 
TextMeshProUGUI tmpTMP
 
StringBuilder sb = new StringBuilder()
 

Static Private Attributes

static string[] fillerChars
 

Detailed Description

Abstract base class for UI elements in the project.

Member Function Documentation

◆ DelayedShow()

IEnumerator UIElement.DelayedShow ( float _delay)
private

Show after set delay.

Parameters
_delayDelay in seconds
Returns

◆ OnAwake()

virtual void UIElement.OnAwake ( )
protectedvirtual

Wrapper for awake to ensure it happens at the correct time (cut down on race conditions)

Reimplemented in UI_Slider, and UI_Toggle.

◆ Show() [1/2]

void UIElement.Show ( float _delay)

Show after set delay.

Parameters
_delayDelay in seconds
Returns

◆ Show() [2/2]

void UIElement.Show ( float _delayMin,
float _delayMax )

Show after randomized delay.

Parameters
_delayMinMin possible delay in seconds
_delayMaxMax possible delay in seconds
Returns

Member Data Documentation

◆ fillerChars

string [] UIElement.fillerChars
staticprivate
Initial value:
= new string[] {
"▓",
"▒",
" "
}

The documentation for this class was generated from the following file: