Class InitializationUIHandler
Controls the init mode panel.
Inheritance
object
InitializationUIHandler
Namespace: AS2.UI
Assembly: .dll
Syntax
public class InitializationUIHandler : MonoBehaviour
Fields
|
Edit this page
View Source
addPar_setting_chirality
Declaration
private UISetting_Dropdown addPar_setting_chirality
Field Value
|
Edit this page
View Source
addPar_setting_compassDir
Declaration
private UISetting_Dropdown addPar_setting_compassDir
Field Value
|
Edit this page
View Source
alg_go_algo
Declaration
public GameObject alg_go_algo
Field Value
Type |
Description |
GameObject |
|
|
Edit this page
View Source
alg_go_paramAmount
Declaration
public GameObject alg_go_paramAmount
Field Value
Type |
Description |
GameObject |
|
|
Edit this page
View Source
alg_setting_algo
Declaration
private UISetting_Dropdown alg_setting_algo
Field Value
|
Edit this page
View Source
Declaration
public Button button_algorithm_abort
Field Value
|
Edit this page
View Source
Declaration
public Button button_algorithm_start
Field Value
|
Edit this page
View Source
button_particle_generate
Declaration
public Button button_particle_generate
Field Value
|
Edit this page
View Source
button_particle_load
Declaration
public Button button_particle_load
Field Value
|
Edit this page
View Source
button_particle_save
Declaration
public Button button_particle_save
Field Value
|
Edit this page
View Source
camColorBG
Declaration
Field Value
|
Edit this page
View Source
camColorInitModeBG
Declaration
public Color camColorInitModeBG
Field Value
|
Edit this page
View Source
genAlg_go_genAlg
Declaration
public GameObject genAlg_go_genAlg
Field Value
Type |
Description |
GameObject |
|
|
Edit this page
View Source
genAlg_go_paramParent
Declaration
public GameObject genAlg_go_paramParent
Field Value
Type |
Description |
GameObject |
|
|
Edit this page
View Source
genAlg_paramInfo
Declaration
private ParameterInfo[] genAlg_paramInfo
Field Value
Type |
Description |
ParameterInfo[] |
|
|
Edit this page
View Source
genAlg_setting_genAlg
Declaration
private UISetting_Dropdown genAlg_setting_genAlg
Field Value
|
Edit this page
View Source
genAlg_settings
Declaration
private List<UISetting> genAlg_settings
Field Value
|
Edit this page
View Source
initModePanel
Declaration
public GameObject initModePanel
Field Value
Type |
Description |
GameObject |
|
|
Edit this page
View Source
initialized
Declaration
Field Value
|
Edit this page
View Source
updatedSettings
Declaration
private List<UISetting> updatedSettings
Field Value
Methods
|
Edit this page
View Source
The init mode is aborted. Closes the init mode, the previous state is loaded afterwards.
Declaration
public void ButtonPressed_Abort()
|
Edit this page
View Source
Takes the currently chosen arguments to generate a particle environment.
Declaration
public void ButtonPressed_Generate()
|
Edit this page
View Source
Opens a file chooser that loads an algorithm.
Declaration
public void ButtonPressed_Load()
|
Edit this page
View Source
Saves the current configuration in a file.
Declaration
public void ButtonPressed_Save()
|
Edit this page
View Source
The simulation is started. Loads everything and closes the init mode.
Declaration
public void ButtonPressed_StartAlgorithm()
|
Edit this page
View Source
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.
|
|
Edit this page
View Source
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.
|
|
Edit this page
View Source
InitUI()
Initializes the initialization UI, so that everything is set up.
Declaration
|
Edit this page
View Source
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.
|
|
Edit this page
View Source
IsOpen()
True if init mode is open.
Declaration
Returns
Type |
Description |
bool |
true if and only if the Initialization Panel is currently active.
|
|
Edit this page
View Source
Open()
Opens the initialization panel.
Declaration
|
Edit this page
View Source
ResetUI()
Regenerates the generation algorithm and the algorithm settings.
Declaration
|
Edit this page
View Source
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.
|
|
Edit this page
View Source
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.
|
|
Edit this page
View Source
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.
|
|
Edit this page
View Source
Start()
Declaration
|
Edit this page
View Source
Update()
Declaration
|
Edit this page
View Source
ValueChanged_Float(string, float)
Callback for changed float settings. Does not do anything yet.
Declaration
public void ValueChanged_Float(string name, float number)
Parameters
Type |
Name |
Description |
string |
name |
|
float |
number |
|
|
Edit this page
View Source
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.
|