This commit is contained in:
@@ -175,6 +175,7 @@ namespace game
|
||||
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
io.IniFilename = nullptr;
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange;
|
||||
|
||||
ImGui::StyleColorsDark();
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace game
|
||||
void render();
|
||||
|
||||
bool isRunning{true};
|
||||
bool isCursorHidden{};
|
||||
|
||||
Canvas canvas{};
|
||||
|
||||
|
||||
@@ -256,7 +256,6 @@ namespace game::state
|
||||
cursor.render(textureShader, rectShader, canvas);
|
||||
canvas.unbind();
|
||||
|
||||
SDL_HideCursor();
|
||||
}
|
||||
|
||||
void Main::save(Resources& resources)
|
||||
|
||||
Reference in New Issue
Block a user