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();
helper.Events.Input.ButtonPressed += this.OnButtonPressed;
}
/*********
** Private methods
*********/
/// Raised after the player presses a button on the keyboard, controller, or mouse.
/// The event sender.
/// The event arguments.
public void OnButtonPressed(object sender, ButtonPressedEventArgs e)
{
// load menu if key pressed
if (Context.IsPlayerFree && e.Button == this.Config.KeyBinding)
Game1.activeClickableMenu = new Billboard();
}
}
}