Search Results for

    Show / Hide Table of Contents

    Class SettingsUIHandler

    Controls the setting panel.

    Inheritance
    object
    SettingsUIHandler
    Namespace: AS2.UI
    Assembly: .dll
    Syntax
    public class SettingsUIHandler : MonoBehaviour

    Fields

    | Edit this page View Source

    camPosInGridCoords

    Declaration
    private bool camPosInGridCoords
    Field Value
    Type Description
    bool
    | Edit this page View Source

    nonFullScreenResolution

    Declaration
    private Vector2Int nonFullScreenResolution
    Field Value
    Type Description
    Vector2Int
    | Edit this page View Source

    settingName_animationsOnOff

    Declaration
    private const string settingName_animationsOnOff = "Animations On/Off"
    Field Value
    Type Description
    string
    | Edit this page View Source

    settingName_beepFailureProb

    Declaration
    private const string settingName_beepFailureProb = "Beep Failure Prob."
    Field Value
    Type Description
    string
    | Edit this page View Source

    settingName_cameraAngle

    Declaration
    private const string settingName_cameraAngle = "Camera Angle"
    Field Value
    Type Description
    string
    | Edit this page View Source

    settingName_cameraPosWorldOrGrid

    Declaration
    private const string settingName_cameraPosWorldOrGrid = "Grid Coordinates"
    Field Value
    Type Description
    string
    | Edit this page View Source

    settingName_cameraPosX

    Declaration
    private const string settingName_cameraPosX = "Camera Pos. X"
    Field Value
    Type Description
    string
    | Edit this page View Source

    settingName_cameraPosY

    Declaration
    private const string settingName_cameraPosY = "Camera Pos. Y"
    Field Value
    Type Description
    string
    | Edit this page View Source

    settingName_cameraSize

    Declaration
    private const string settingName_cameraSize = "Camera Size"
    Field Value
    Type Description
    string
    | Edit this page View Source

    settingName_circuitBorder

    Declaration
    private const string settingName_circuitBorder = "Circuit Border"
    Field Value
    Type Description
    string
    | Edit this page View Source

    settingName_circularRing

    Declaration
    private const string settingName_circularRing = "Circular Ring"
    Field Value
    Type Description
    string
    | Edit this page View Source

    settingName_compassOvArrows

    Declaration
    private const string settingName_compassOvArrows = "Compass Ov. Arrows"
    Field Value
    Type Description
    string
    | Edit this page View Source

    settingName_fullscreen

    Declaration
    private const string settingName_fullscreen = "Fullscreen"
    Field Value
    Type Description
    string
    | Edit this page View Source

    settingName_toggleTooltips

    Declaration
    private const string settingName_toggleTooltips = "Tooltips"
    Field Value
    Type Description
    string
    | Edit this page View Source

    setting_beepFailureProb

    Declaration
    private UISetting_Text setting_beepFailureProb
    Field Value
    Type Description
    UISetting_Text
    | Edit this page View Source

    setting_cameraPosX

    Declaration
    private UISetting_Text setting_cameraPosX
    Field Value
    Type Description
    UISetting_Text
    | Edit this page View Source

    setting_cameraPosY

    Declaration
    private UISetting_Text setting_cameraPosY
    Field Value
    Type Description
    UISetting_Text
    | Edit this page View Source

    setting_cameraSize

    Declaration
    private UISetting_Text setting_cameraSize
    Field Value
    Type Description
    UISetting_Text
    | Edit this page View Source

    settingsPanel

    Declaration
    public GameObject settingsPanel
    Field Value
    Type Description
    GameObject
    | Edit this page View Source

    settingsParent

    Declaration
    public GameObject settingsParent
    Field Value
    Type Description
    GameObject
    | Edit this page View Source

    uiHandler

    Declaration
    private UIHandler uiHandler
    Field Value
    Type Description
    UIHandler

    Methods

    | Edit this page View Source

    Button_CameraApply()

    Reads the current position and size values from the Settings Panel and applies them to the camera.

    Declaration
    private void Button_CameraApply()
    | Edit this page View Source

    Button_SaveSettings()

    Stores the current settings in the configuration and saves the config file.

    Declaration
    private void Button_SaveSettings()
    | Edit this page View Source

    Button_SettingsPressed()

    Activates/Deactivates the settings panel depending on its active state. Connected to the Settings button in the Scene.

    Declaration
    public void Button_SettingsPressed()
    | Edit this page View Source

    Close()

    Closes the settings panel.

    Declaration
    public void Close()
    | Edit this page View Source

    InitSettings()

    Initializes the settings UI. Dynamically sets up all the settings with all their input fields. Initial values are loaded from the configuration file if they are not available elsewhere.

    Declaration
    private void InitSettings()
    | Edit this page View Source

    SettingChanged_BeepFailureProb(string, string)

    Declaration
    private void SettingChanged_BeepFailureProb(string name, string value)
    Parameters
    Type Name Description
    string name
    string value
    | Edit this page View Source

    SettingChanged_Dropdown(string, string)

    Called by a setting callback when a setting has been changed.

    Declaration
    private void SettingChanged_Dropdown(string name, string value)
    Parameters
    Type Name Description
    string name

    The name of the changed setting.

    string value

    The setting's new string value.

    | Edit this page View Source

    SettingChanged_Text(string, string)

    Called by a setting callback when a setting has been changed.

    Declaration
    private void SettingChanged_Text(string name, string text)
    Parameters
    Type Name Description
    string name

    The name of the changed setting.

    string text

    The setting's new string value.

    | Edit this page View Source

    SettingChanged_Toggle(string, bool)

    Called by a setting callback when a setting has been changed.

    Declaration
    private void SettingChanged_Toggle(string name, bool isOn)
    Parameters
    Type Name Description
    string name

    The name of the changed setting.

    bool isOn

    The setting's new bool value.

    | Edit this page View Source

    SettingChanged_Value(string, float)

    Called by a setting callback when a setting has been changed.

    Declaration
    private void SettingChanged_Value(string name, float value)
    Parameters
    Type Name Description
    string name

    The name of the changed setting.

    float value

    The setting's new float value.

    | Edit this page View Source

    Start()

    Declaration
    private void Start()
    | Edit this page View Source

    ToggleCamPositionWorldGrid(bool)

    Changes the displayed camera coordinates to be world or grid coordinates.

    Declaration
    private void ToggleCamPositionWorldGrid(bool grid)
    Parameters
    Type Name Description
    bool grid

    If true, display grid coordinates, otherwise display world coordinates.

    | Edit this page View Source

    UpdateCameraData(float, float, float)

    Updates the fields related to the camera position and size in the Settings Panel.

    Declaration
    public void UpdateCameraData(float x, float y, float size)
    Parameters
    Type Name Description
    float x

    The x world coordinate of the camera.

    float y

    The y world coordinate of the camera.

    float size

    The orthographic size of the camera.

    • Edit this page
    • View Source
    In this article
    Back to top AmoebotSim 2.0 Documentation v1.11
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX