From 00d9febe65dcb15b3ae6d48553934f8766731215 Mon Sep 17 00:00:00 2001 From: Abbysssal <55982389+Abbysssal@users.noreply.github.com> Date: Thu, 3 Jun 2021 23:10:31 +0700 Subject: [PATCH] fix for color and name of the buttons in new level traits --- RogueLibsCore/Hooks/Unlocks/DisplayedUnlock.cs | 2 +- RogueLibsCore/Hooks/Unlocks/TraitUnlock.cs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/RogueLibsCore/Hooks/Unlocks/DisplayedUnlock.cs b/RogueLibsCore/Hooks/Unlocks/DisplayedUnlock.cs index 305ed27a3..17782bc2b 100644 --- a/RogueLibsCore/Hooks/Unlocks/DisplayedUnlock.cs +++ b/RogueLibsCore/Hooks/Unlocks/DisplayedUnlock.cs @@ -93,7 +93,7 @@ private int GetStateNum() /// Disabled/not selected state. protected void UpdateButton(bool isEnabledOrSelected, UnlockButtonState selected, UnlockButtonState normal) { - Text = GetName(); + Text = GetFancyName(); if (IsUnlocked) { State = isEnabledOrSelected ? selected : normal; diff --git a/RogueLibsCore/Hooks/Unlocks/TraitUnlock.cs b/RogueLibsCore/Hooks/Unlocks/TraitUnlock.cs index 62d836135..25186bc48 100644 --- a/RogueLibsCore/Hooks/Unlocks/TraitUnlock.cs +++ b/RogueLibsCore/Hooks/Unlocks/TraitUnlock.cs @@ -136,10 +136,9 @@ public override void OnPushedButton() ScrollingMenu menu = ((CustomScrollingMenu)Menu).Menu; if (menu.twitchCountdownOn) return; State = UnlockButtonState.Selected; - if (gc.twitchMode || (gc.sessionDataBig.twitchOn && gc.sessionDataBig.twitchTraits)) - { + UpdateMenu(); + if (gc.twitchMode || gc.sessionDataBig.twitchOn && gc.sessionDataBig.twitchTraits) gc.twitchFunctions.ShowWinner(Name, "StatusEffect", Menu.Agent.isPlayer); - } if (Name == "EnduranceTrait") { Menu.Agent.SetEndurance(Menu.Agent.enduranceStatMod + 1, true);