Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
- removed unused imports
- fixed UI bug : showing selected boss ring when getting hits if counter UI disabled
  • Loading branch information
Dastan21 committed Nov 13, 2021
1 parent 711fc71 commit a2934ec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion PantheonsHitCounter/ModMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class ModMenu {
private static MenuScreen _modsMenu;
public static MenuOptionHorizontal pantheonSelector, stateSelector;
private static ModToggleDelegates _stateToggle;
private static int _selectedPantheon = 0;
private static int _selectedPantheon;
private static readonly string[] ToggleState = { "Disabled", "Enabled" };

private static void AddMenuOptions(ContentArea area)
Expand Down
4 changes: 1 addition & 3 deletions PantheonsHitCounter/PantheonsHitCounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Modding;
using On.InControl;
using PantheonsHitCounter.UI;
using UnityEngine;

namespace PantheonsHitCounter
{
Expand All @@ -30,7 +28,7 @@ public class PantheonsHitCounter : Mod, IGlobalSettings<GlobalData>, ILocalSetti
private static readonly string[] CompletedScene = { "GG_End_Sequence", "End_Game_Completion" };

public PantheonsHitCounter() : base("Pantheons Hit Counter") {}
public override string GetVersion() => "1.0.0";
public override string GetVersion() => "1.0.1";
public void OnLoadGlobal(GlobalData data) => globalData = data;
public GlobalData OnSaveGlobal() => globalData;
public void OnLoadLocal(LocalData data) => _localData = data;
Expand Down
2 changes: 1 addition & 1 deletion PantheonsHitCounter/UI/CounterUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static void UpdateUI(Pantheon pantheon)
var bossPanel = _panel.GetPanel("PHC-BossSplit-" + b);
var boss = bosses[b + currentBossNumber];
var bossImg = ResourcesLoader.Instance.images[boss.name.Replace(" ", "_")];
bossPanel.GetImage("BossSplitSelected").SetActive(b == GetSelectedSplit(pantheon.bossNumber, bosses.Count));
bossPanel.GetImage("BossSplitSelected").SetActive(b == GetSelectedSplit(pantheon.bossNumber, bosses.Count) && _panel.Active);
bossPanel.GetImage("BossImage").UpdateImage(bossImg, new Rect(0, 0, bossImg.width, bossImg.height));
bossPanel.GetText("BossName").UpdateText(boss.name);
bossPanel.GetText("BossHits").UpdateText(boss.hits + "");
Expand Down

0 comments on commit a2934ec

Please sign in to comment.