parent to camera

This commit is contained in:
Asuro
2025-03-27 22:38:31 +01:00
parent 90d4c3df1b
commit 26ba03b7fe
4 changed files with 29 additions and 27 deletions

View File

@@ -476,22 +476,6 @@ namespace Game
debug.DebugCardRotation++;
if (debug.DebugCardRotation >= 4) debug.DebugCardRotation = 0;
}
ImGui::SetNextWindowPos({0, 0});
if (ImGui::Begin("Stats",
nullptr,
ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoInputs |
ImGuiWindowFlags_AlwaysAutoResize))
{
if (GetInstance().Player.CameraM == CameraMode::Freefly)
{
ImGui::PushStyleColor(ImGuiCol_Text, {0.8f, 0.1f, 0.1f, 1.0f});
ImGui::Text("NOCLIP");
ImGui::PopStyleColor();
}
ImGui::Text("Delta: %.01fms", time.Delta * 1000);
ImGui::Text("FPS: %.0f", 1.0 / time.Delta);
}
ImGui::End();
if (ImGui::Begin("Log"))
{
ImGui::Checkbox("Shorten File Names", &GetInstance().DebugData.ShortenLogFileNames);
@@ -717,6 +701,7 @@ namespace Game
{
ZoneScopedN("Rendering");
SharedData& shared = GetShared();
auto& time = GetInstance().Time;
HandleEvents();
@@ -732,6 +717,22 @@ namespace Game
{
RenderDebugUI();
}
ImGui::SetNextWindowPos({0, 0});
if (ImGui::Begin("Stats",
nullptr,
ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoInputs |
ImGuiWindowFlags_AlwaysAutoResize))
{
if (GetInstance().Player.CameraM == CameraMode::Freefly)
{
ImGui::PushStyleColor(ImGuiCol_Text, {0.8f, 0.1f, 0.1f, 1.0f});
ImGui::Text("NOCLIP");
ImGui::PopStyleColor();
}
ImGui::Text("Delta: %.01fms", time.Delta * 1000);
ImGui::Text("FPS: %.0f", 1.0 / time.Delta);
}
ImGui::End();
GetInstance().GameLevel.Update();
GetInstance().GameLevel.Render(MainViewID, Models, Materials);