Why did I fix this when we have a helper

This commit is contained in:
Luke Street
2026-04-09 23:32:42 -06:00
parent 4dd287c851
commit 50450d8e6f
+1 -8
View File
@@ -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();
}