예제 #1
0
 private void OnSetInfoModeClick(UIComponent component, UIMouseEventParameter eventParam)
 {
     if (component == lblHappiness)
     {
         ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Happiness, InfoManager.SubInfoMode.Default);
     }
     else if (component == lblIcon || component == lblPopulation || component == lblChange || component == lblSenior || component == lblUnemployment)
     {
         ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Density, InfoManager.SubInfoMode.Default);
     }
     else if (component == lblHealth)
     {
         ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Health, InfoManager.SubInfoMode.Default);
     }
     else if (component == lblEducation1)
     {
         ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Education, InfoManager.SubInfoMode.ElementarySchool);
     }
     else if (component == lblEducation2)
     {
         ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Education, InfoManager.SubInfoMode.HighSchool);
     }
     else if (component == lblEducation3)
     {
         ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Education, InfoManager.SubInfoMode.University);
     }
 }
예제 #2
0
 private void OnSetInfoModeClick(UIComponent component, UIMouseEventParameter eventParam)
 {
     if (component == lblBuildings)
     {
         ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.BuildingLevel, InfoManager.SubInfoMode.Default);
     }
     else if (component == lblLandValue)
     {
         ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.LandValue, InfoManager.SubInfoMode.Default);
     }
     else if (component == lblDistricts)
     {
         ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Districts, InfoManager.SubInfoMode.Default);
     }
     else if (component == lblTrees)
     {
         ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.NaturalResources, InfoManager.SubInfoMode.Default);
     }
     else if (component == lblCityName)
     {
         ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.NoisePollution, InfoManager.SubInfoMode.Default);
     }
     else if (component == lblTouristsAverage)
     {
         ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Connections, InfoManager.SubInfoMode.Tourism);
     }
 }
예제 #3
0
 public override void OnLevelLoaded(LoadMode mode)
 {
     base.OnLevelLoaded(mode);
     if (mode == LoadMode.LoadGame || mode == LoadMode.NewGame)
     {
         if (PlatformService.apiBackend == APIBackend.Steam)
         {
             ExtendedInfoManager.run();
         }
     }
 }
예제 #4
0
 private void OnSetInfoModeClick(UIComponent component, UIMouseEventParameter eventParam)
 {
     if (component == lblPublicTransportAverage)
     {
         ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Transport, InfoManager.SubInfoMode.Default);
     }
     else if (component == lblVehicleCount || component == lblIcon)
     {
         ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Traffic, InfoManager.SubInfoMode.Default);
         UIView.library.Hide("TrafficInfoViewPanel");
     }
 }
예제 #5
0
        //public class ToolsModifierControl : UICustomControl
        //{
        //    private static EconomyPanel m_EconomyPanel;
        //    public static EconomyPanel economyPanel
        //    {
        //        get
        //        {
        //            if (m_EconomyPanel == null)
        //            {
        //                UIComponent component = UIView.Find("EconomyPanel");
        //                if (component != null)
        //                {
        //                    m_EconomyPanel = component.GetComponent<EconomyPanel>();
        //                }
        //            }
        //            return m_EconomyPanel;
        //        }
        //    }

        //    public static void Show()
        //    {
        //        if (economyPanel != null)
        //        {
        //            economyPanel.Hide();
        //        }
        //    }
        //}

        private void OnSetInfoModeClick(UIComponent component, UIMouseEventParameter eventParam)
        {
            if (component == impOilColor || component == impOreColor || component == impGoodsColor ||
                component == impForestryColor || component == impAgricultureColor || component == lblImportTotal)
            {
                ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Connections, InfoManager.SubInfoMode.Import);
            }
            else if (component == expOilColor || component == expOreColor || component == expGoodsColor ||
                     component == expForestryColor || component == expAgricultureColor || component == lblExportTotal)
            {
                ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Connections, InfoManager.SubInfoMode.Export);
            }
        }
예제 #6
0
 private void OnSetInfoModeClick(UIComponent component, UIMouseEventParameter P)
 {
     if (component == educationPanel || component == meterElementary)
     {
         if (P.position.y <= 15)
         {
             ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Education, InfoManager.SubInfoMode.University);
         }
         else if (P.position.y <= 30)
         {
             ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Education, InfoManager.SubInfoMode.HighSchool);
         }
         else
         {
             ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Education, InfoManager.SubInfoMode.Default);
         }
     }
     else if (component == meterElementary)
     {
         ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Education, InfoManager.SubInfoMode.Default);
     }
     else if (component == meterHighSchool)
     {
         ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Education, InfoManager.SubInfoMode.HighSchool);
     }
     else if (component == meterUniversity)
     {
         ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Education, InfoManager.SubInfoMode.University);
     }
     else if (component == electWaterPanel)
     {
         if (P.position.y <= 25)
         {
             ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Water, InfoManager.SubInfoMode.Default);
         }
         else
         {
             ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Electricity, InfoManager.SubInfoMode.Default);
         }
     }
     else if (component == meterElectricity)
     {
         ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Electricity, InfoManager.SubInfoMode.Default);
     }
     else if (component == meterWater || component == meterSewage)
     {
         ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Water, InfoManager.SubInfoMode.Default);
     }
 }
예제 #7
0
 private void OnRightSetInfoModeClick(UIComponent component, UIMouseEventParameter P)
 {
     if (P.buttons == UIMouseButton.Right)
     {
         if (component == lblCityName)
         {
             UIView.playSoundDelegate(this.GetUIView().defaultClickSound, 1f);
             ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Pollution, InfoManager.SubInfoMode.Default);
         }
         else
         if (component == lblLandValue)
         {
             UIView.playSoundDelegate(this.GetUIView().defaultClickSound, 1f);
             ExtendedInfoManager.SetCurrentMode(InfoManager.InfoMode.Entertainment, InfoManager.SubInfoMode.Default);
         }
     }
 }
예제 #8
0
 public override void OnReleased()
 {
     base.OnReleased();
     ExtendedInfoManager.stop();
 }