Class InitializationUIHandler
Controls the init mode panel.
Inheritance
InitializationUIHandler
Namespace: AS2.UI
Assembly: .dll
Syntax
public class InitializationUIHandler : MonoBehaviour
Fields
addPar_setting_chirality
Declaration
private UISetting_Dropdown addPar_setting_chirality
Field Value
addPar_setting_compassDir
Declaration
private UISetting_Dropdown addPar_setting_compassDir
Field Value
alg_go_algo
Declaration
public GameObject alg_go_algo
Field Value
Type |
Description |
GameObject |
|
alg_go_paramAmount
Declaration
public GameObject alg_go_paramAmount
Field Value
Type |
Description |
GameObject |
|
alg_setting_algo
Declaration
private UISetting_Dropdown alg_setting_algo
Field Value
Declaration
public Button button_algorithm_abort
Field Value
Declaration
public Button button_algorithm_start
Field Value
button_particle_generate
Declaration
public Button button_particle_generate
Field Value
button_particle_load
Declaration
public Button button_particle_load
Field Value
button_particle_save
Declaration
public Button button_particle_save
Field Value
camColorBG
Declaration
Field Value
camColorInitModeBG
Declaration
public Color camColorInitModeBG
Field Value
genAlg_go_genAlg
Declaration
public GameObject genAlg_go_genAlg
Field Value
Type |
Description |
GameObject |
|
genAlg_go_paramParent
Declaration
public GameObject genAlg_go_paramParent
Field Value
Type |
Description |
GameObject |
|
genAlg_paramInfo
Declaration
private ParameterInfo[] genAlg_paramInfo
Field Value
genAlg_setting_genAlg
Declaration
private UISetting_Dropdown genAlg_setting_genAlg
Field Value
genAlg_settings
Declaration
private List<UISetting> genAlg_settings
Field Value
initModePanel
Declaration
public GameObject initModePanel
Field Value
Type |
Description |
GameObject |
|
initialized
Declaration
Field Value
updatedSettings
Declaration
private List<UISetting> updatedSettings
Field Value
Methods
The init mode is aborted. Closes the init mode, the previous state is loaded afterwards.
Declaration
public void ButtonPressed_Abort()
Takes the currently chosen arguments to generate a particle environment.
Declaration
public void ButtonPressed_Generate()
Opens a file chooser that loads an algorithm.
Declaration
public void ButtonPressed_Load()
Saves the current configuration in a file.
Declaration
public void ButtonPressed_Save()
The simulation is started. Loads everything and closes the init mode.
Declaration
public void ButtonPressed_StartAlgorithm()
Close(bool)
Closes the initialization panel.
Declaration
public void Close(bool aborted)
Parameters
Type |
Name |
Description |
bool |
aborted |
True if the init mode has been aborted.
False if execution is successful.
|
GetSelectedAlgorithmName()
Returns the name of the currently selected algorithm.
Declaration
public string GetSelectedAlgorithmName()
Returns
Type |
Description |
string |
The current value of the algorithm selection dropdown.
|
InitUI()
Initializes the initialization UI, so that everything is set up.
Declaration
IsInitialized()
Checks if the class has been initialized already.
Declaration
public bool IsInitialized()
Returns
Type |
Description |
bool |
true if and only if the class has been initialized.
|
IsOpen()
True if init mode is open.
Declaration
Returns
Type |
Description |
bool |
true if and only if the Initialization Panel is currently active.
|
Open()
Opens the initialization panel.
Declaration
ResetUI()
Regenerates the generation algorithm and the algorithm settings.
Declaration
SetUpAlgUI(string)
Sets up the UI for the given algorithm.
Checks if the given algorithm exists and then loads a default generation
algorithm UI, if one has been defined.
At the end, the system is generated once.
Declaration
private void SetUpAlgUI(string algorithm)
Parameters
Type |
Name |
Description |
string |
algorithm |
The unique name of the new selected algorithm.
|
SetUpGenAlgUI(string)
Sets up the UI for the given generation algorithm.
Here the parameters of the generation algorithm are loaded via reflection,
packed into a list of UI settings and shown to the user. Default values
defined in the code are also set.
Declaration
private void SetUpGenAlgUI(string algorithm)
Parameters
Type |
Name |
Description |
string |
algorithm |
The unique name of the new selected
generation method.
|
SettingBarPressedLong(string, float)
Handler for the event that a setting has been pressed for
an extended time.
Applies the chirality/compass dir if the corresponding button has been clicked long enough.
Declaration
public void SettingBarPressedLong(string name, float duration)
Parameters
Type |
Name |
Description |
string |
name |
The name of the setting that was pressed.
|
float |
duration |
The duration for which the button has been pressed.
|
Start()
Declaration
Update()
Declaration
ValueChanged_Float(string, float)
Callback for changed float settings. Does not do anything yet.
Declaration
public void ValueChanged_Float(string name, float number)
Parameters
ValueChanged_Text(string, string)
Called when the user changes some values in certain dropdowns.
Declaration
public void ValueChanged_Text(string name, string text)
Parameters
Type |
Name |
Description |
string |
name |
The name of the changed setting.
|
string |
text |
The new string value of the setting.
|