mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-19 20:34:26 +01:00
Add functionality to the MessagePopupScreen class.
It can more or less replace PromptScreen in PPSSPP.
This commit is contained in:
1 parent
6ee862b564
commit
167f2a8a2c
2 files changed
+19
-4
No files matched your search
+14
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user