Пример #1
0
        public Items()
        {
            Config = ModEntry.Config;
            items  = new Dictionary <int, SObject>();

            AddItems();
        }
        /// <summary>The mod entry point, called after the mod is first loaded.</summary>
        /// <param name="helper">Provides simplified APIs for writing mods.</param>
        public override void Entry(IModHelper helper)
        {
            //ModEntry is called once before SDV loads.In 3.0 its called even earlier than 2.x - things like Game1.objectInformation
            //aren't ready yet. If you need to run stuff when a save is ready use the save loaded event
            Translator = helper.Translation;
            helper.Events.Input.ButtonPressed += OnButtonPressed;

            modConfig = Helper.ReadConfig <ModConfig>();
            buttonToBringUpInterface = modConfig.button;
            Config = new ConfigOptions(modConfig.button, modConfig.ShowItemsFromLockedPlaces, modConfig.ShowAllFishFromCurrentSeason,
                                       modConfig.ShowAllRecipes, modConfig.AlwaysShowAllRecipes, modConfig.CommonAmount, modConfig.HighestQualityAmount);
        }
Пример #3
0
 public Menu() : base(Game1.viewport.Width / 2 - (800 + borderWidth * 2) / 2, Game1.viewport.Height / 2 - (600 + borderWidth * 2) / 2, 800 + borderWidth * 2, 600 + borderWidth * 2, true)
 {
     Config = ModEntry.Config;
     tabs   = new List <ClickableComponent>();
     pages  = new List <MenuTab>();
     tabIconParentSheetIndices = new List <int>();
     invisible         = false;
     HoverText         = "";
     CurrentTab        = (int)TabName.SpecificSeasonTab;
     ForcePreventClose = false;
     AddTabs();
     AddPages();
 }