mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Make "OK" and "Cancel" in PromptScreen translatable, and shorten some keys.
This commit is contained in:
parent
361a6eaf63
commit
5655ddc835
@ -226,22 +226,22 @@ bool LoadFile(std::string &filename, std::string *error_string) {
|
||||
|
||||
case FILETYPE_ARCHIVE_RAR:
|
||||
#ifdef WIN32
|
||||
*error_string = "File is compressed (RAR).\nPlease decompress first (try WinRAR)";
|
||||
*error_string = "RAR file detected (Require WINRAR)";
|
||||
#else
|
||||
*error_string = "File is compressed (RAR).\nPlease decompress first (try UnRAR)";
|
||||
*error_string = "RAR file detected (Require UnRAR)";
|
||||
#endif
|
||||
break;
|
||||
|
||||
case FILETYPE_ARCHIVE_ZIP:
|
||||
#ifdef WIN32
|
||||
*error_string = "File is compressed (ZIP).\nPlease decompress first (try WinRAR)";
|
||||
*error_string = "ZIP file detected (Require WINRAR)";
|
||||
#else
|
||||
*error_string = "File is compressed (ZIP).\nPlease decompress first (try UnRAR)";
|
||||
*error_string = "ZIP file detected (Require UnRAR)";
|
||||
#endif
|
||||
break;
|
||||
|
||||
case FILETYPE_ISO_MODE2:
|
||||
*error_string = "File is a MODE2 image. Are you trying to open a PSX game?";
|
||||
*error_string = "PSX game image deteced.";
|
||||
break;
|
||||
|
||||
case FILETYPE_NORMAL_DIRECTORY:
|
||||
|
@ -139,6 +139,13 @@ void UIDialogScreenWithBackground::DrawBackground(UIContext &dc) {
|
||||
dc.Flush();
|
||||
}
|
||||
|
||||
PromptScreen::PromptScreen(std::string message, std::string yesButtonText, std::string noButtonText, std::function<void(bool)> callback)
|
||||
: message_(message), callback_(callback) {
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
yesButtonText_ = d->T(yesButtonText.c_str());
|
||||
noButtonText_ = d->T(noButtonText.c_str());
|
||||
}
|
||||
|
||||
void PromptScreen::CreateViews() {
|
||||
// Information in the top left.
|
||||
// Back button to the bottom left.
|
||||
|
@ -43,12 +43,8 @@ protected:
|
||||
|
||||
class PromptScreen : public UIDialogScreenWithBackground {
|
||||
public:
|
||||
PromptScreen(std::string message, std::string yesButtonText, std::string noButtonText)
|
||||
: message_(message), yesButtonText_(yesButtonText), noButtonText_(noButtonText) {
|
||||
callback_ = &NoOpVoidBool;
|
||||
}
|
||||
PromptScreen(std::string message, std::string yesButtonText, std::string noButtonText, std::function<void(bool)> callback)
|
||||
: message_(message), yesButtonText_(yesButtonText), noButtonText_(noButtonText), callback_(callback) {}
|
||||
PromptScreen(std::string message, std::string yesButtonText, std::string noButtonText,
|
||||
std::function<void(bool)> callback = &NoOpVoidBool);
|
||||
|
||||
virtual void CreateViews();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user