diff --git a/src/xenia/kernel/xam/xam_ui.cc b/src/xenia/kernel/xam/xam_ui.cc index e2e01d015..7df8d194c 100644 --- a/src/xenia/kernel/xam/xam_ui.cc +++ b/src/xenia/kernel/xam/xam_ui.cc @@ -38,6 +38,9 @@ class MessageBoxDialog : public xe::ui::ImGuiDialog { buttons_(std::move(buttons)), default_button_(default_button), out_chosen_button_(out_chosen_button) { + if (!title_.size()) { + title_ = "Message Box"; + } if (out_chosen_button) { *out_chosen_button = default_button; } @@ -52,7 +55,9 @@ class MessageBoxDialog : public xe::ui::ImGuiDialog { } if (ImGui::BeginPopupModal(title_.c_str(), nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { - ImGui::Text("%s", description_.c_str()); + if (description_.size()) { + ImGui::Text("%s", description_.c_str()); + } if (first_draw) { ImGui::SetKeyboardFocusHere(); } @@ -170,6 +175,14 @@ class KeyboardInputDialog : public xe::ui::ImGuiDialog { default_text_(xe::to_string(default_text)), out_text_(out_text), max_length_(max_length) { + if (!title_.size()) { + if (!description_.size()) { + title_ = "Keyboard Input"; + } else { + title_ = description_; + description_ = ""; + } + } if (out_text_) { *out_text_ = default_text; } @@ -187,7 +200,9 @@ class KeyboardInputDialog : public xe::ui::ImGuiDialog { } if (ImGui::BeginPopupModal(title_.c_str(), nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { - ImGui::TextWrapped("%s", description_.c_str()); + if (description_.size()) { + ImGui::TextWrapped("%s", description_.c_str()); + } if (first_draw) { ImGui::SetKeyboardFocusHere(); }