diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-11-01 14:09:04 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-11-01 14:09:04 +0100 |
| commit | a2918b9724a65ba147cfafc6bcf8d410a647330b (patch) | |
| tree | 3b8ca3ee934a239f458b889f06beb673fa32ffa4 /src/ui/imgui_extensions.cpp | |
| parent | 9b8664daf17dac9efb1f4add9d00c562e4ddbf40 (diff) | |
export ui, localizations
Diffstat (limited to 'src/ui/imgui_extensions.cpp')
| -rw-r--r-- | src/ui/imgui_extensions.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ui/imgui_extensions.cpp b/src/ui/imgui_extensions.cpp index 359fc17..f3b9ff8 100644 --- a/src/ui/imgui_extensions.cpp +++ b/src/ui/imgui_extensions.cpp @@ -38,7 +38,7 @@ namespace ImGui const ImVec4 col = ImGui::GetStyleColorVec4(ImGuiCol_ButtonHovered); const ImVec4 bg = ImGui::GetStyleColorVec4(ImGuiCol_Button); - ImGui::LoadingIndicatorCircle("##loadingAnim", radius, bg, col, 6, 4.0f); + ImGui::LoadingIndicatorCircle(radius, bg, col, 6, 4.0f); } if (disabled) ImGui::EndDisabled(); @@ -76,7 +76,7 @@ namespace ImGui const ImVec4 col = ImGui::GetStyleColorVec4(ImGuiCol_ButtonHovered); const ImVec4 bg = ImGui::GetStyleColorVec4(ImGuiCol_Button); - ImGui::LoadingIndicatorCircle("##loadingAnim", radius, bg, col, 6, 4.0f); + ImGui::LoadingIndicatorCircle(radius, bg, col, 6, 4.0f); ImGui::EndDisabled(); ImGui::PopID(); @@ -135,7 +135,7 @@ namespace ImGui } } - bool FileSelect(char* text, char* buffer) + bool FileSelect(const char* text, char* buffer) { bool result = false; float widthAvailable = ImGui::GetContentRegionAvail().x; @@ -145,7 +145,7 @@ namespace ImGui { const char *filterPatterns[] = { "*.pdf" }; const char *file = tinyfd_openFileDialog( - "Choose a file", // dialog title // @localize + locale::get("ui.fileselect.title"), // dialog title NULL, // default path 1, // number of filter patterns filterPatterns, // filter patterns array @@ -162,13 +162,13 @@ namespace ImGui if (buffer[0] != '\0') { ImGui::SameLine(); - if (ImGui::Button("Clear")) + if (ImGui::Button(locale::get("ui.clear"))) { buffer[0] = '\0'; result = true; } ImGui::SameLine(); - ImGui::TextWrapped("Selected: %s", buffer); // @localize + ImGui::TextWrapped("%s: %s", locale::get("ui.selected"), buffer); } |
