Static class to provide UI Styling functions which are used by in-game UIs and inspectors.
More...
|
| static void | ApplyBoxStyle (VisualElement v) |
| | Apply the "Box" Style to a VisualElement: This will draw a border around the element to make a box.
|
| static void | ApplyEditorBoxStyle (VisualElement v) |
| | Apply the "Editor Box" Style to a VisualElement: This will draw a border around the element to make a box.
|
| static void | ApplyHeaderStyle (Label label) |
| | Apply the "Header" Style to a VisualElement: This will make the text bigger and bold.
|
| static string | GetLoadingStatusText (DataBinding dataBinding, float progress) |
| | Get the loading progress of a scene and convert it to a string of either "+" or "-" (Activate or Unload).
|
| static StyleColor | GetLoadingStatusColor (DataBinding dataBinding, float progress) |
| | Get the loading progress of a scene and convert it to a Color: Red, Yellow, or Green.
|
Static class to provide UI Styling functions which are used by in-game UIs and inspectors.
◆ ApplyBoxStyle()
| void ApplyBoxStyle |
( |
VisualElement | v | ) |
|
|
static |
Apply the "Box" Style to a VisualElement: This will draw a border around the element to make a box.
- Parameters
-
| v | VisualElement to apply the Box Style to. |
◆ ApplyEditorBoxStyle()
| void ApplyEditorBoxStyle |
( |
VisualElement | v | ) |
|
|
static |
Apply the "Editor Box" Style to a VisualElement: This will draw a border around the element to make a box.
- Parameters
-
| v | VisualElement to apply the Box Style to. |
◆ ApplyHeaderStyle()
| void ApplyHeaderStyle |
( |
Label | label | ) |
|
|
static |
Apply the "Header" Style to a VisualElement: This will make the text bigger and bold.
- Parameters
-
| label | The Label element to apply the style to. |
◆ GetLoadingStatusColor()
| StyleColor GetLoadingStatusColor |
( |
DataBinding | dataBinding, |
|
|
float | progress ) |
|
static |
Get the loading progress of a scene and convert it to a Color: Red, Yellow, or Green.
Red: Progress = 0 - 0.8 (Data is loading). Yellow: Progress = 0.9 (Data has been loaded, but allowSceneActivation is false. Green: Progress = 1 (Level is 100% loaded and has been activated).
- Parameters
-
- Returns
- StyleColor Red, Yellow, or Green to set Loading Status indicator.
◆ GetLoadingStatusText()
| string GetLoadingStatusText |
( |
DataBinding | dataBinding, |
|
|
float | progress ) |
|
static |
Get the loading progress of a scene and convert it to a string of either "+" or "-" (Activate or Unload).
When loading a scene with allowSceneActivation = false, the scene will stop its loading progress at 0.9 to await activation. The "+" button will finish loading a scene from 0.9 to 1. The "-" button is shown when a scene is fully loaded and clicking it will unload the scene.
- Parameters
-
- Returns
- string "-" or "+", to be displayed on Button.Text
The documentation for this class was generated from the following file:
- U:/UnityProjects/AdditiveSceneManager/Assets/AdditiveSceneManager/Scripts/UIStyle.cs