Compare commits

...

2 Commits

1 changed files with 10 additions and 9 deletions

View File

@ -813,11 +813,11 @@ static std::string BytesToString(size_t bytes) {
}
void ImGuiConsole::ShowDebugOverlay() {
if (!m_developer) {
if (!m_developer && !m_frameCounter && !m_frameRate && !m_inGameTime && !m_roomTimer) {
return;
}
if (!m_frameCounter && !m_frameRate && !m_inGameTime && !m_roomTimer && !m_playerInfo && !m_areaInfo &&
!m_worldInfo && !m_randomStats && !m_resourceStats && !m_pipelineInfo && !m_drawCallInfo && !m_bufferInfo) {
if (!m_playerInfo && !m_areaInfo && !m_worldInfo && !m_randomStats && !m_resourceStats && !m_pipelineInfo &&
!m_drawCallInfo && !m_bufferInfo) {
return;
}
ImGuiIO& io = ImGui::GetIO();
@ -867,7 +867,7 @@ void ImGuiConsole::ShowDebugOverlay() {
ImGuiStringViewText(fmt::format(FMT_STRING("Room Time: {:7.3f} / {:5d} | Last Room:{:7.3f} / {:5d}\n"),
currentRoomTime, curFrames, m_lastRoomTime, lastFrames));
}
if (m_playerInfo && g_StateManager != nullptr && g_StateManager->Player() != nullptr) {
if (m_playerInfo && g_StateManager != nullptr && g_StateManager->Player() != nullptr && m_developer) {
if (hasPrevious) {
ImGui::Separator();
}
@ -890,7 +890,7 @@ void ImGuiConsole::ShowDebugOverlay() {
pl.GetVelocity().y(), pl.GetVelocity().z(), camXf.origin.x(), camXf.origin.y(), camXf.origin.z(),
zeus::radToDeg(camQ.roll()), zeus::radToDeg(camQ.pitch()), zeus::radToDeg(camQ.yaw())));
}
if (m_worldInfo && g_StateManager != nullptr) {
if (m_worldInfo && g_StateManager != nullptr && m_developer) {
if (hasPrevious) {
ImGui::Separator();
}
@ -900,7 +900,7 @@ void ImGuiConsole::ShowDebugOverlay() {
ImGuiStringViewText(
fmt::format(FMT_STRING("World Asset ID: 0x{}, Name: {}\n"), g_GameState->CurrentWorldAssetId(), name));
}
if (m_areaInfo && g_StateManager != nullptr) {
if (m_areaInfo && g_StateManager != nullptr && m_developer) {
const metaforce::TAreaId aId = g_GameState->CurrentWorldState().GetCurrentAreaId();
if (g_StateManager->GetWorld() != nullptr && g_StateManager->GetWorld()->DoesAreaExist(aId)) {
if (hasPrevious) {
@ -926,7 +926,7 @@ void ImGuiConsole::ShowDebugOverlay() {
pArea->GetAreaAssetId(), ImGuiLoadStringTable(stringId, 0), pArea->GetAreaId(), layerBits));
}
}
if (m_layerInfo && g_StateManager != nullptr) {
if (m_layerInfo && g_StateManager != nullptr && m_developer) {
const metaforce::TAreaId aId = g_GameState->CurrentWorldState().GetCurrentAreaId();
const auto* world = g_StateManager->GetWorld();
if (world != nullptr && world->DoesAreaExist(aId) && world->GetWorldLayers()) {
@ -956,7 +956,7 @@ void ImGuiConsole::ShowDebugOverlay() {
}
}
}
if (m_randomStats) {
if (m_randomStats && m_developer) {
if (hasPrevious) {
ImGui::Separator();
}
@ -1058,7 +1058,8 @@ void ImGuiConsole::ShowInputViewer() {
ImGui::SetNextWindowBgAlpha(0.65f);
if (ImGui::Begin("Input Overlay", nullptr, windowFlags)) {
/* If the position has changed and we're not in a corner, grab it and store it */
if (m_inputOverlayCorner == -1 && (ImGui::GetWindowPos().x != m_inputOverlayPos.x() || ImGui::GetWindowPos().y != m_inputOverlayPos.y())) {
if (m_inputOverlayCorner == -1 &&
(ImGui::GetWindowPos().x != m_inputOverlayPos.x() || ImGui::GetWindowPos().y != m_inputOverlayPos.y())) {
m_inputOverlayPos = ImGui::GetWindowPos();
m_cvarCommons.m_debugInputOverlayPos->fromVec2f(m_inputOverlayPos);
}