public override void Draw() { GUILayout.Label(UI.Title, Styles.label, GUILayout.ExpandWidth(true)); GUILayout.BeginHorizontal(); //change key binding if (GUILayout.Button(SelectingKey? new GUIContent("HotKey: ?", "Choose new TCA hotkey") : new GUIContent(string.Format("HotKey: {0}", UI.TCA_Key), "Select TCA Hotkey"), SelectingKey? Styles.enabled_button : Styles.active_button, GUILayout.ExpandWidth(true))) { SelectingKey = true; Utils.Message("Press a key that will toggle TCA.\n" + "Press BACKSPACE to remove TCA hotkey.\n" + "Press ESCAPE to cancel."); } Utils.ButtonSwitch("Autosave", ref Globals.Instance.AutosaveBeforeLanding, "Automatically save the game before executing complex autopilot programs", GUILayout.ExpandWidth(true)); if (Utils.ButtonSwitch(Globals.Instance.UseStockAppLauncher? "Launcher" : "Toolbar", ref Globals.Instance.UseStockAppLauncher, "Use stock AppLauncher or Toolbar plugin?", GUILayout.ExpandWidth(true))) { TCAToolbarManager.Init(); } if (GUILayout.Button(new GUIContent("Reload", "Reload TCA settings from file"), Styles.active_button, GUILayout.ExpandWidth(true))) { Globals.Load(); Styles.ConfigureButtons(); TCA.OnReloadGlobals(); } if (GUILayout.Button(new GUIContent("Modules", "Show TCA modules installed on this ship"), Styles.active_button, GUILayout.ExpandWidth(true))) { UI.ModulesGraph.Toggle(); } GUILayout.EndHorizontal(); Toggles(); if (THR != null) { GUILayout.BeginHorizontal(); CFG.ControlSensitivity = Utils.FloatSlider("Keyboard sensitivity", CFG.ControlSensitivity, 0.001f, 0.05f, "P2"); GUILayout.EndHorizontal(); } ControllerProperties(); ConfigsGUI(); #if DEBUG GUILayout.Space(10); TCA.TEST.Draw(); #endif }
void AdvancedOptions() { if (!adv_options) { return; } GUILayout.BeginVertical(Styles.white); GUILayout.Label(Title, Styles.label, GUILayout.ExpandWidth(true)); GUILayout.BeginHorizontal(); //change key binding if (GUILayout.Button(selecting_key? new GUIContent("Change TCA hotkey: ?", "Choose new TCA hotkey") : new GUIContent(string.Format("Change TCA hotkey: {0}", TCA_Key), "Select TCA Hotkey"), selecting_key? Styles.enabled_button : Styles.active_button, GUILayout.ExpandWidth(true))) { selecting_key = true; Utils.Message("Press a key that will toggle TCA"); } Utils.ButtonSwitch("Autosave on landing", ref Globals.Instance.AutosaveBeforeLanding); if (Utils.ButtonSwitch("Use Stock Toolbar", ref Globals.Instance.UseStockAppLauncher)) { TCAToolbarManager.Init(); } if (GUILayout.Button("Reload TCA Settings", Styles.active_button, GUILayout.ExpandWidth(true))) { Globals.Load(); Styles.ConfigureButtons(); TCA.OnReloadGlobals(); } GUILayout.EndHorizontal(); Toggles.Draw(); if (THR != null) { GUILayout.BeginHorizontal(); CFG.ControlSensitivity = Utils.FloatSlider("Keyboard controls sensitivity", CFG.ControlSensitivity, 0.001f, 0.05f, "P2"); GUILayout.EndHorizontal(); } ControllerProperties(); ConfigsGUI(); GUILayout.EndVertical(); }