diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index 7e40eb7f9..0c0f07f8f 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -2275,7 +2275,7 @@ void CMenus::OnRender() // render debug information if(g_Config.m_Debug) - Ui()->DebugRender(); + Ui()->DebugRender(2.0f, Ui()->Screen()->h - 12.0f); if(Ui()->ConsumeHotkey(CUi::HOTKEY_ESCAPE)) SetActive(false); diff --git a/src/game/client/ui.cpp b/src/game/client/ui.cpp index 138b01ae2..fada88295 100644 --- a/src/game/client/ui.cpp +++ b/src/game/client/ui.cpp @@ -258,13 +258,13 @@ void CUi::Update(vec2 MouseWorldPos) m_ProgressSpinnerOffset = std::fmod(m_ProgressSpinnerOffset, 1.0f); } -void CUi::DebugRender() +void CUi::DebugRender(float X, float Y) { MapScreen(); char aBuf[128]; str_format(aBuf, sizeof(aBuf), "hot=%p nexthot=%p active=%p lastactive=%p", HotItem(), NextHotItem(), ActiveItem(), m_pLastActiveItem); - TextRender()->Text(2.0f, Screen()->h - 12.0f, 10.0f, aBuf); + TextRender()->Text(X, Y, 10.0f, aBuf); } bool CUi::MouseInside(const CUIRect *pRect) const diff --git a/src/game/client/ui.h b/src/game/client/ui.h index 72972d9f3..a680cfbf4 100644 --- a/src/game/client/ui.h +++ b/src/game/client/ui.h @@ -470,7 +470,7 @@ public: void SetEnabled(bool Enabled) { m_Enabled = Enabled; } bool Enabled() const { return m_Enabled; } void Update(vec2 MouseWorldPos = vec2(-1.0f, -1.0f)); - void DebugRender(); + void DebugRender(float X, float Y); vec2 MousePos() const { return m_MousePos; } float MouseX() const { return m_MousePos.x; } diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index 8ce93f506..ca238a279 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -8777,6 +8777,9 @@ void CEditor::OnRender() m_ShowMousePointer = true; } + if(g_Config.m_Debug) + Ui()->DebugRender(2.0f, Ui()->Screen()->h - 27.0f); + Ui()->FinishCheck(); Ui()->ClearHotkeys(); Input()->Clear();