git repos / saland

commit f3881875

Poul Sander · 2023-02-25 19:55
f3881875a3dc5f02f822bf7e21789d6432e22434 patch · browse files
parent b4e2f3cda4f035564aab052fb016abf1f23edb8c

Prevent changing skill while the skill menu is not open

Changed files

M src/saland/GameSpellState.cpp before
diff --git a/src/saland/GameSpellState.cpp b/src/saland/GameSpellState.cpp index 6d9f2ca..c737710 100644 --- a/src/saland/GameSpellState.cpp +++ b/src/saland/GameSpellState.cpp
@@ -90,6 +90,9 @@ bool GameSpellState::IsSpellSelectActive() {
}
void GameSpellState::ProcessInput(const SDL_Event& event, bool& processed) {
+ if (!data->spellSelectActive) {
+ return;
+ }
UpdateMouseCoordinates(event, globalData.mousex, globalData.mousey);
if (event.type == SDL_KEYDOWN) {
if (event.key.keysym.sym == SDLK_ESCAPE) {