using Omegasis.BillboardAnywhere.Framework; using StardewModdingAPI; using StardewModdingAPI.Events; using StardewValley; using StardewValley.Menus; namespace Omegasis.BillboardAnywhere { /// The mod entry point. public class BillboardAnywhere : Mod { /********* ** Properties *********/ /// The mod configuration. private ModConfig Config; /********* ** Public methods *********/ /// The mod entry point, called after the mod is first loaded. /// Provides simplified APIs for writing mods. public override void Entry(IModHelper helper) { this.Config = helper.ReadConfig(); ControlEvents.KeyPressed += this.ControlEvents_KeyPressed; } /********* ** Private methods *********/ /// The method invoked when the presses a keyboard button. /// The event sender. /// The event data. public void ControlEvents_KeyPressed(object sender, EventArgsKeyPressed e) { // load menu if key pressed if (Context.IsPlayerFree && e.KeyPressed.ToString() == this.Config.KeyBinding) Game1.activeClickableMenu = new Billboard(); } } }