From 50450d8e6fbd7b56f2e386c238d43183d93c7258 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Thu, 9 Apr 2026 23:32:42 -0600 Subject: [PATCH] Why did I fix this when we have a helper --- src/dusk/imgui/ImGuiControllerOverlay.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/dusk/imgui/ImGuiControllerOverlay.cpp b/src/dusk/imgui/ImGuiControllerOverlay.cpp index 0baafc0b3c..bd53e6f91d 100644 --- a/src/dusk/imgui/ImGuiControllerOverlay.cpp +++ b/src/dusk/imgui/ImGuiControllerOverlay.cpp @@ -6,13 +6,6 @@ #include "ImGuiMenuGame.hpp" namespace dusk { - void TextCenter(const std::string& text) { - float font_size = ImGui::CalcTextSize(text.c_str()).x; - ImGui::SameLine(ImGui::GetWindowSize().x / 2 - font_size + (font_size / 2)); - - ImGui::TextUnformatted(text.c_str()); - } - void ImGuiMenuGame::windowInputViewer() { if (!m_showInputViewer) { return; @@ -35,7 +28,7 @@ namespace dusk { if (ImGui::Begin("Input Viewer", nullptr, windowFlags)) { float scale = ImGuiScale(); if (!m_controllerName.empty()) { - TextCenter(m_controllerName); + ImGuiTextCenter(m_controllerName); ImGui::Separator(); }