Add functionality to the MessagePopupScreen class.

It can more or less replace PromptScreen in PPSSPP.
This commit is contained in:
The Dax committed 2014-09-14 19:54:25 -04:00
1 parent 6ee862b564
commit 167f2a8a2c
2 files changed
+19 -4

No files matched your search

+14 -1
View File
@@ -206,7 +206,20 @@ void PopupScreen::CreateViews() {
}
void MessagePopupScreen::CreatePopupContents(UI::ViewGroup *parent) {
parent->Add(new UI::TextView(message_));
std::vector<std::string> messageLines;
SplitString(message_, '\n', messageLines);
for (const auto& lineOfText : messageLines)
parent->Add(new UI::TextView(lineOfText, ALIGN_LEFT | ALIGN_VCENTER, false));
}
void MessagePopupScreen::OnCompleted(DialogResult result) {
if (result == DR_OK) {
if (callback_)
callback_(true);
} else {
if (callback_)
callback_(false);
}
}
UI::EventReturn PopupScreen::OnOK(UI::EventParams &e) {