Skip to content

Commit

Permalink
Fix entering numbers in warp cheat dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnoAnsems committed Apr 23, 2021
1 parent 911677d commit 6f710a7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Catacomb3D/Catacomb3DMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,8 +603,8 @@ const std::string& Catacomb3DMenu::GetNewSaveGameName() const

void Catacomb3DMenu::AddNewSavedGame(const PlayerInput& playerInput, const std::string& name)
{
m_guiMenu.AddChild(new GuiElementButton(playerInput, name, { GuiActionLoadGame, (int16_t)(m_savedGames.size() - 1) }, m_renderableText), 0, 0, restoreGameListId);
m_guiMenu.AddChild(new GuiElementButton(playerInput, name, { GuiActionSaveGame, (int16_t)(m_savedGames.size() - 1) }, m_renderableText), 0, 0, saveGameListId);
m_guiMenu.AddChild(new GuiElementSaveSlotStaticCat3D(playerInput, name, { GuiActionLoadGame, (int16_t)(m_savedGames.size() - 1) }, m_renderableText, m_flashIcon), 0, 0, restoreGameListId);
m_guiMenu.AddChild(new GuiElementSaveSlotStaticCat3D(playerInput, name, { GuiActionSaveGame, (int16_t)(m_savedGames.size() - 1) }, m_renderableText, m_flashIcon), 0, 0, saveGameListId);
}

void Catacomb3DMenu::OpenRestoreGameMenu()
Expand Down
10 changes: 7 additions & 3 deletions src/Engine/EngineCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -841,13 +841,17 @@ bool EngineCore::Think()
}
else
{
for (uint8_t i = 0x31; i < 0x39; i++)
if (m_state == InGame)
{
if (m_playerInput.IsKeyJustPressed(i))
for (uint8_t i = 0x31; i < 0x39; i++)
{
ReadScroll(i - 0x31);
if (m_playerInput.IsKeyJustPressed(i))
{
ReadScroll(i - 0x31);
}
}
}

if (m_playerInput.IsKeyJustPressed(SDLK_n)) // N
{
KeyNPressed();
Expand Down

0 comments on commit 6f710a7

Please sign in to comment.