diff --git a/src/overlay/user_interface.cpp b/src/overlay/user_interface.cpp index 1bbebb0..ffcf43a 100644 --- a/src/overlay/user_interface.cpp +++ b/src/overlay/user_interface.cpp @@ -1,5 +1,6 @@ #include "user_interface.h" #include "constants.h" +#include "localisation.h" namespace spacecal { @@ -8,11 +9,10 @@ namespace spacecal { inline void BuildVersionInfo() { ImGui::SetNextWindowPos(ImVec2(10.0f, ImGui::GetWindowHeight() - ImGui::GetFrameHeightWithSpacing())); ImGui::BeginChild("spacecal_version_box", ImVec2(ImGui::GetWindowWidth() - 20.0f, ImGui::GetFrameHeightWithSpacing() * 2), ImGuiChildFlags_None); - ImGui::Text("Space Calibrator Nova v" SPACECAL_VERSION_STRING); - if (bIsRunningInOverlay) - { - ImGui::SameLine(); - ImGui::Text(" - close VR overlay to use mouse"); + if (bIsRunningInOverlay) { + ImGui::Text(LOCALE_FORMAT("app_title_vr", "Space Calibrator Nova", SPACECAL_VERSION_STRING).c_str()); + } else { + ImGui::Text(LOCALE_FORMAT("app_title", "Space Calibrator Nova", SPACECAL_VERSION_STRING).c_str()); } ImGui::EndChild(); } @@ -21,6 +21,9 @@ namespace spacecal { bIsRunningInOverlay = isOverlay; auto& io = ImGui::GetIO(); + // disable ctrl + tab, pointless in a VR overlay https://github.com/ocornut/imgui/issues/7987 + ImGui::Shortcut(ImGuiMod_Ctrl | ImGuiKey_Tab, ImGuiInputFlags_RouteGlobal); + constexpr ImGuiWindowFlags k_bareWindowFlags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | @@ -34,6 +37,8 @@ namespace spacecal { ImGui::Begin("Space Calibrator", nullptr, k_bareWindowFlags); + // @TODO: Build ui + BuildVersionInfo(); ImGui::End(); }