mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-09 04:30:49 -04:00
Why did I fix this when we have a helper
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user