Skip to content

Commit cdcd51c

Browse files
committed
Cheats Menu - Allow other displays to be shown while the menu for spawning items is displayed
1 parent 3446529 commit cdcd51c

File tree

3 files changed

+11
-17
lines changed

3 files changed

+11
-17
lines changed

ttyd-tools/rel/source/codes.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,9 @@ void reloadRoom()
571571
if (!MenuVar.ChangingCheatButtonCombo && checkButtonCombo(Cheat[RELOAD_ROOM].ButtonCombo))
572572
{
573573
// Prevent being able to reload the room if the menu is open or if currently in the spawn item menu
574-
if (Cheat[RELOAD_ROOM].Active && !MenuVar.MenuIsDisplayed && !SpawnItem.InAdjustableValueMenu)
574+
if (Cheat[RELOAD_ROOM].Active &&
575+
!MenuVar.MenuIsDisplayed &&
576+
!SpawnItem.InAdjustableValueMenu)
575577
{
576578
reloadRoomMain();
577579
}
@@ -817,7 +819,7 @@ void spawnItem()
817819
}
818820

819821
// Draw the menu
820-
drawFunctionOnDebugLayer(drawAdjustableValueSpawnItem);
822+
drawFunctionOnDebugLayerWithOrder(drawAdjustableValueSpawnItem, 10.f);
821823
}
822824
else if (tempInAdjustableValueMenu)
823825
{

ttyd-tools/rel/source/main.cpp

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -799,8 +799,7 @@ void Mod::run()
799799

800800
// Check if the menu should be enabled or disabled
801801
// Prevent checking it if currently in the process of spawning an item
802-
bool CurrentlySpawningItem = SpawnItem.InAdjustableValueMenu;
803-
if (!CurrentlySpawningItem)
802+
if (!SpawnItem.InAdjustableValueMenu)
804803
{
805804
enableOrDisableMenu();
806805
}
@@ -834,8 +833,7 @@ void Mod::run()
834833
if (!MenuVar.MenuIsDisplayed || MenuVar.HideMenu)
835834
{
836835
// Don't display some displays if the Guard/Superguard timings display is active
837-
// Don't display some displays if current in the process of spawning an item
838-
if ((DisplayActionCommands.DisplayTimer == 0) && !CurrentlySpawningItem)
836+
if (DisplayActionCommands.DisplayTimer == 0)
839837
{
840838
// Only run button-based displays if currently not changing button combos
841839
if (!tempChangingCheatButtonCombo)
@@ -857,14 +855,9 @@ void Mod::run()
857855
// Only run button-based displays if currently not changing button combos
858856
if (!tempChangingCheatButtonCombo)
859857
{
860-
// Don't display some displays if current in the process of spawning an item
861-
if (!CurrentlySpawningItem)
862-
{
863-
displayOnScreenTimer();
864-
displayFrameCounter();
865-
displayJumpStorageDetails();
866-
}
867-
858+
displayOnScreenTimer();
859+
displayFrameCounter();
860+
displayJumpStorageDetails();
868861
displayButtonInputs();
869862
}
870863

ttyd-tools/rel/source/menufunctions.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4175,9 +4175,8 @@ void updateOnScreenTimerVars()
41754175
if (PreviousFrameTime != 0)
41764176
{
41774177
if (!OnScreenTimer.TimerPaused &&
4178-
(!MenuVar.MenuIsDisplayed || MenuVar.HideMenu) &&
4179-
!SpawnItem.InAdjustableValueMenu &&
4180-
!MenuVar.ChangingCheatButtonCombo)
4178+
(!MenuVar.MenuIsDisplayed || MenuVar.HideMenu) &&
4179+
!MenuVar.ChangingCheatButtonCombo)
41814180
{
41824181
int64_t IncrementAmount = CurrentFrameTime - PreviousFrameTime;
41834182
OnScreenTimer.MainTimer += IncrementAmount;

0 commit comments

Comments
 (0)