diff --git a/NodeController/GUI/Panel/CollapsorButton.cs b/NodeController/GUI/Panel/CollapsorButton.cs index 475c9bf..e4e9b44 100644 --- a/NodeController/GUI/Panel/CollapsorButton.cs +++ b/NodeController/GUI/Panel/CollapsorButton.cs @@ -1,11 +1,14 @@ namespace NodeController.GUI { + using ColossalFramework; using ColossalFramework.UI; using KianCommons.UI; using System.Collections; using UnityEngine; public class CollapsorButton : UIButton { - UIPanel targetPanel_; + private static SavedBool showAdvanced_ = new SavedBool("ShowAdvanced", Settings.FileName, false, true); + private UIPanel targetPanel_; + public override void Awake() { base.Awake(); name = GetType().FullName; @@ -32,18 +35,22 @@ public override void Awake() { public void SetTarget(UIPanel panel) { targetPanel_ = panel; - targetPanel_.Hide(); + if (!showAdvanced_.value) { + targetPanel_.Hide(); + } } public void Collapse() { targetPanel_.Hide(); text = text.Replace("▲", "▼"); GetComponentInParent().Refresh(); + showAdvanced_.value = false; } public void Open() { targetPanel_.Show(); text = text.Replace("▼", "▲"); GetComponentInParent().Refresh(); + showAdvanced_.value = true; } protected override void OnClick(UIMouseEventParameter p) { diff --git a/NodeController/NodeController.csproj b/NodeController/NodeController.csproj index 0bb91b1..43578ca 100644 --- a/NodeController/NodeController.csproj +++ b/NodeController/NodeController.csproj @@ -7,7 +7,7 @@ NodeController Copyright © 2020 false - 2.6.2.* + 2.6.3.* 512 latest full