/// <summary>
        /// Show the menu
        /// </summary>
        private void ShowMenu()
        {
            string MoonPhase = "";

            if (UseLunarDisturbancesApi)
            {
                MoonPhase = MoonAPI.GetCurrentMoonPhase();
            }

            string NightTime = "";

            if (UseDynamicNightApi)
            {
                NightTime = Helper.Translation.Get("nightTime",
                                                   new
                {
                    sunrise   = new SDVTime(DynamicNightAPI.GetSunriseTime()),
                    sunset    = new SDVTime(DynamicNightAPI.GetSunsetTime()),
                    nighttime = new SDVTime(DynamicNightAPI.GetAstroTwilightTime())
                });
            }

            string MenuText = DescriptionEngine.GenerateMenuPopup(Conditions, MoonPhase, NightTime);

            // show menu
            this.PreviousMenu         = Game1.activeClickableMenu;
            Game1.activeClickableMenu = new WeatherMenu(OurIcons, Conditions, MenuText);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Show the menu
        /// </summary>
        private void ShowMenu()
        {
            string MenuText = DescriptionEngine.GenerateMenuPopup(Conditions, OurMoon);

            // show menu
            this.PreviousMenu         = Game1.activeClickableMenu;
            Game1.activeClickableMenu = new WeatherMenu(Monitor, this.Helper.Reflection, OurIcons, Helper.Translation, Conditions,
                                                        OurMoon, WeatherOpt, MenuText);
        }