This commit is contained in:
@@ -175,6 +175,7 @@ namespace game
|
|||||||
|
|
||||||
ImGuiIO& io = ImGui::GetIO();
|
ImGuiIO& io = ImGui::GetIO();
|
||||||
io.IniFilename = nullptr;
|
io.IniFilename = nullptr;
|
||||||
|
io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange;
|
||||||
|
|
||||||
ImGui::StyleColorsDark();
|
ImGui::StyleColorsDark();
|
||||||
|
|
||||||
|
|||||||
@@ -90,6 +90,16 @@ namespace game
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto isHideCursor = type == MAIN;
|
||||||
|
if (isHideCursor != isCursorHidden)
|
||||||
|
{
|
||||||
|
if (isHideCursor)
|
||||||
|
SDL_HideCursor();
|
||||||
|
else
|
||||||
|
SDL_ShowCursor();
|
||||||
|
isCursorHidden = isHideCursor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void State::render()
|
void State::render()
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ namespace game
|
|||||||
void render();
|
void render();
|
||||||
|
|
||||||
bool isRunning{true};
|
bool isRunning{true};
|
||||||
|
bool isCursorHidden{};
|
||||||
|
|
||||||
Canvas canvas{};
|
Canvas canvas{};
|
||||||
|
|
||||||
|
|||||||
@@ -256,7 +256,6 @@ namespace game::state
|
|||||||
cursor.render(textureShader, rectShader, canvas);
|
cursor.render(textureShader, rectShader, canvas);
|
||||||
canvas.unbind();
|
canvas.unbind();
|
||||||
|
|
||||||
SDL_HideCursor();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Main::save(Resources& resources)
|
void Main::save(Resources& resources)
|
||||||
|
|||||||
Reference in New Issue
Block a user