Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
PrimitiveUI.Examples.ControlBoxScaler Class Reference
Inheritance diagram for PrimitiveUI.Examples.ControlBoxScaler:

Public Attributes

Text[] textElements
 

Private Member Functions

void Start ()
 
void Update ()
 

Private Attributes

Vector2 screenSize
 

Detailed Description

Definition at line 6 of file ControlBoxScaler.cs.

Member Function Documentation

◆ Start()

void PrimitiveUI.Examples.ControlBoxScaler.Start ( )
inlineprivate

Definition at line 12 of file ControlBoxScaler.cs.

13 {
14 screenSize = new Vector2(Screen.width, Screen.height);
15 Text[] array = textElements;
16 for (int i = 0; i < array.Length; i++)
17 {
18 array[i].fontSize = Mathf.FloorToInt(Screen.height / 20);
19 }
20 }

References PrimitiveUI.Examples.ControlBoxScaler.screenSize, and PrimitiveUI.Examples.ControlBoxScaler.textElements.

◆ Update()

void PrimitiveUI.Examples.ControlBoxScaler.Update ( )
inlineprivate

Definition at line 22 of file ControlBoxScaler.cs.

23 {
24 if ((float)Screen.width != screenSize.x || (float)Screen.height != screenSize.y)
25 {
26 Text[] array = textElements;
27 for (int i = 0; i < array.Length; i++)
28 {
29 array[i].fontSize = Mathf.FloorToInt(Screen.height / 20);
30 }
31 screenSize = new Vector2(Screen.width, Screen.height);
32 }
33 }

References PrimitiveUI.Examples.ControlBoxScaler.screenSize, and PrimitiveUI.Examples.ControlBoxScaler.textElements.

Member Data Documentation

◆ screenSize

Vector2 PrimitiveUI.Examples.ControlBoxScaler.screenSize
private

◆ textElements

Text [] PrimitiveUI.Examples.ControlBoxScaler.textElements

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