public override void OnLevelLoaded(LoadMode mode)
 {
     if (mode.Equals(LoadMode.NewGame) || mode.Equals(LoadMode.LoadGame))
     {
         infoviewButtons = GameObject.Find("InfoViewsPanel").transform.FindChild("Container").gameObject.GetComponentsInChildren <ColossalFramework.UI.UIButton>();
     }
     menuButton             = GameObject.Find("InfoMenu").transform.FindChild("Info").GetComponent <ColossalFramework.UI.UIButton>();
     menuButton.eventClick += ButtonClick;
 }
 public override void OnLevelLoaded(LoadMode mode)
 {
     if (mode.Equals(LoadMode.NewGame) || mode.Equals(LoadMode.LoadGame))
     {
         toggleOn = false;
         ColossalFramework.UI.UIButton resourceButton = GameObject.Find("InfoViewsPanel").transform.FindChild("Container").FindChild("Resources").gameObject.GetComponent <ColossalFramework.UI.UIButton>();
         resourceButton.eventClick += ButtonClick;
     }
 }
Exemple #3
0
 public override void OnLevelLoaded(LoadMode mode)
 {
     toggleOn = false;
     loadMode = mode;
     PersistentResourceView.currentInfomode = InfoManager.InfoMode.None;
     if (mode.Equals(LoadMode.NewGame) || mode.Equals(LoadMode.LoadGame))
     {
         ColossalFramework.UI.UIButton resourceButton = GameObject.Find("InfoViewsPanel").transform.FindChild("Container").FindChild("Resources").gameObject.GetComponent <ColossalFramework.UI.UIButton>();
         resourceButton.eventClick += ButtonClick;
     }
     else if (mode.Equals(LoadMode.NewMap) || mode.Equals(LoadMode.LoadMap))
     {
         DebugOutputPanel.AddMessage(ColossalFramework.Plugins.PluginManager.MessageType.Message, "mapstuff loaded");
         ColossalFramework.UI.UIButton[] infoviewButtons = GameObject.Find("InfoViewsPanel").transform.FindChild("Container").gameObject.GetComponentsInChildren <ColossalFramework.UI.UIButton>();
         foreach (ColossalFramework.UI.UIButton button in infoviewButtons)
         {
             button.eventClick += ButtonClick;
         }
     }
 }