Class ThemeElement
A base class that is intended to be used on any component/class that needs theming (that's automatically updated), and needs reference to our main class: PomodoroTimer.
Inheritance
System.Object
    UnityEngine.Object
    UnityEngine.Component
    UnityEngine.Behaviour
    UnityEngine.MonoBehaviour
    ThemeElement
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
  Implements
Namespace: AdrianMiasik.Components.Base
Assembly: Assembly-CSharp.dll
Syntax
public class ThemeElement : MonoBehaviour, IColorHookFields
| Improve this Doc View SourceTimer
Declaration
protected PomodoroTimer TimerField Value
| Type | Description | 
|---|---|
| PomodoroTimer | 
Methods
| Improve this Doc View SourceColorUpdate(Theme)
Applies our theme changes to our referenced components when necessary.
Declaration
public virtual void ColorUpdate(Theme theme)Parameters
| Type | Name | Description | 
|---|---|---|
| Theme | theme | 
Initialize(PomodoroTimer, Boolean)
Declaration
public virtual void Initialize(PomodoroTimer pomodoroTimer, bool updateColors = true)Parameters
| Type | Name | Description | 
|---|---|---|
| PomodoroTimer | pomodoroTimer | Our main class | 
| System.Boolean | updateColors | Do you want to update or invoke this elements ColorUpdate method on initialization? | 
IsInitialized()
Fetches this components initialization state.
Declaration
public bool IsInitialized()Returns
| Type | Description | 
|---|---|
| System.Boolean | Has this component been initialized yet? | 
OnDestroy()
De-register itself from the theme on destruction to avoid invoking IColorHook ColorUpdate() on a null reference.
Declaration
public void OnDestroy()