public override void Entry(IModHelper helper) { this.config = helper.ReadConfig <ModConfig>(); var buttonColor = helper.Content.Load <Texture2D>("assets/buttonColor.png"); var buttonQuality = helper.Content.Load <Texture2D>("assets/buttonQuality.png"); this.buttonSmashHandler = new ButtonSmashHandler(this, this.config); if (config.EnableUIColorSmashButton) { this.buttonSmashHandler.AddButton(ModEntry.SmashType.Color, buttonColor, new Rectangle(0, 0, 16, 16)); } if (config.EnableUIQualitySmashButton) { this.buttonSmashHandler.AddButton(ModEntry.SmashType.Quality, buttonQuality, new Rectangle(0, 0, 16, 16)); } this.handlerKeybinds = new SingleSmashHandler(this, this.config, buttonColor, buttonQuality); this.helper = helper; AddEvents(helper); //this.buttonHandler.AddButton(ModEntry.SmashType.Color, imageColor, new Rectangle(0, 0, 16, 16)); //this.buttonHandler.AddButton(ModEntry.SmashType.Quality, imageQuality, new Rectangle(0, 0, 16, 16)); }
public override void Entry(IModHelper helper) { this.config = helper.ReadConfig <ModConfig>(); var buttonColor = helper.Content.Load <Texture2D>("assets/buttonColor.png"); var buttonQuality = helper.Content.Load <Texture2D>("assets/buttonQuality.png"); this.helper = helper; this.handlerUiButtons = new QualitySmashHandler(this, this.config, buttonColor, buttonQuality); this.handlerKeybinds = new SingleSmashHandler(this, this.config, buttonColor, buttonQuality); AddEvents(helper); }