MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / ShowDebugLogFlag

Function ShowDebugLogFlag

Source/3rdParty/imgui/imgui.cpp:17808–17831  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17806}
17807
17808static void ShowDebugLogFlag(const char* name, ImGuiDebugLogFlags flags)
17809{
17810 ImGuiContext& g = *GImGui;
17811 ImVec2 size(ImGui::GetFrameHeight() + g.Style.ItemInnerSpacing.x + ImGui::CalcTextSize(name).x, ImGui::GetFrameHeight());
17812 SameLineOrWrap(size); // FIXME-LAYOUT: To be done automatically once we rework ItemSize/ItemAdd into ItemLayout.
17813
17814 bool highlight_errors = (flags == ImGuiDebugLogFlags_EventError && g.DebugLogSkippedErrors > 0);
17815 if (highlight_errors)
17816 ImGui::PushStyleColor(ImGuiCol_Text, ImLerp(g.Style.Colors[ImGuiCol_Text], ImVec4(1.0f, 0.0f, 0.0f, 1.0f), 0.30f));
17817 if (ImGui::CheckboxFlags(name, &g.DebugLogFlags, flags) && g.IO.KeyShift && (g.DebugLogFlags & flags) != 0)
17818 {
17819 g.DebugLogAutoDisableFrames = 2;
17820 g.DebugLogAutoDisableFlags |= flags;
17821 }
17822 if (highlight_errors)
17823 {
17824 ImGui::PopStyleColor();
17825 ImGui::SetItemTooltip("%d past errors skipped.", g.DebugLogSkippedErrors);
17826 }
17827 else
17828 {
17829 ImGui::SetItemTooltip("Hold Shift when clicking to enable for 2 frames only (useful for spammy log entries)");
17830 }
17831}
17832
17833void ImGui::ShowDebugLogWindow(bool* p_open)
17834{

Callers 1

ShowDebugLogWindowMethod · 0.85

Calls 5

SameLineOrWrapFunction · 0.85
ImLerpFunction · 0.85
ImVec4Class · 0.85
PopStyleColorFunction · 0.85
PushStyleColorFunction · 0.50

Tested by

no test coverage detected