mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #3596 from wuspring/shortenkey
Make "OK" and "Cancel" in PromptScreen traslatable.
This commit is contained in:
commit
1c42964c59
3 changed files with 14 additions and 11 deletions
|
@ -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…
Add table
Reference in a new issue