cursor issue
Some checks failed
Build / Build Game (push) Has been cancelled

This commit is contained in:
2026-03-01 03:28:23 -05:00
parent 2aaf6dcf75
commit 0f855f7125
4 changed files with 12 additions and 1 deletions

View File

@@ -175,6 +175,7 @@ namespace game
ImGuiIO& io = ImGui::GetIO();
io.IniFilename = nullptr;
io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange;
ImGui::StyleColorsDark();

View File

@@ -90,6 +90,16 @@ namespace game
default:
break;
}
auto isHideCursor = type == MAIN;
if (isHideCursor != isCursorHidden)
{
if (isHideCursor)
SDL_HideCursor();
else
SDL_ShowCursor();
isCursorHidden = isHideCursor;
}
}
void State::render()

View File

@@ -39,6 +39,7 @@ namespace game
void render();
bool isRunning{true};
bool isCursorHidden{};
Canvas canvas{};

View File

@@ -256,7 +256,6 @@ namespace game::state
cursor.render(textureShader, rectShader, canvas);
canvas.unbind();
SDL_HideCursor();
}
void Main::save(Resources& resources)