mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 23:10:38 +00:00
Merge pull request #7836 from vnctdj/i18nCat
Consistently use pointer names for translation categories
This commit is contained in:
commit
58b223e974
@ -201,21 +201,21 @@ void PSPDialog::DisplayButtons(int flags, const char *caption)
|
||||
strncpy(safeCaption, caption, 64);
|
||||
}
|
||||
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
float x1 = 183.5f, x2 = 261.5f;
|
||||
if (GetCommonParam()->buttonSwap == 1) {
|
||||
x1 = 261.5f;
|
||||
x2 = 183.5f;
|
||||
}
|
||||
if (flags & DS_BUTTON_OK) {
|
||||
const char *text = useCaption ? safeCaption : d->T("Enter");
|
||||
const char *text = useCaption ? safeCaption : di->T("Enter");
|
||||
PPGeDrawImage(okButtonImg, x2, 258, 11.5f, 11.5f, 0, CalcFadedColor(0x80000000));
|
||||
PPGeDrawImage(okButtonImg, x2, 256, 11.5f, 11.5f, 0, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(text, x2 + 15.5f, 254, PPGE_ALIGN_LEFT, FONT_SCALE, CalcFadedColor(0x80000000));
|
||||
PPGeDrawText(text, x2 + 14.5f, 252, PPGE_ALIGN_LEFT, FONT_SCALE, CalcFadedColor(0xFFFFFFFF));
|
||||
}
|
||||
if (flags & DS_BUTTON_CANCEL) {
|
||||
const char *text = useCaption ? safeCaption : d->T("Back");
|
||||
const char *text = useCaption ? safeCaption : di->T("Back");
|
||||
PPGeDrawText(text, x1 + 15.5f, 254, PPGE_ALIGN_LEFT, FONT_SCALE, CalcFadedColor(0x80000000));
|
||||
PPGeDrawText(text, x1 + 14.5f, 252, PPGE_ALIGN_LEFT, FONT_SCALE, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawImage(cancelButtonImg, x1, 258, 11.5f, 11.5f, 0, CalcFadedColor(0x80000000));
|
||||
|
@ -155,18 +155,18 @@ void PSPMsgDialog::DisplayMessage(std::string text, bool hasYesNo, bool hasOK)
|
||||
|
||||
if (hasYesNo)
|
||||
{
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
const char *choiceText;
|
||||
u32 yesColor, noColor;
|
||||
float x, w;
|
||||
if (yesnoChoice == 1) {
|
||||
choiceText = d->T("Yes");
|
||||
choiceText = di->T("Yes");
|
||||
x = 204.0f;
|
||||
yesColor = 0xFFFFFFFF;
|
||||
noColor = 0xFFFFFFFF;
|
||||
}
|
||||
else {
|
||||
choiceText = d->T("No");
|
||||
choiceText = di->T("No");
|
||||
x = 273.0f;
|
||||
yesColor = 0xFFFFFFFF;
|
||||
noColor = 0xFFFFFFFF;
|
||||
@ -178,10 +178,10 @@ void PSPMsgDialog::DisplayMessage(std::string text, bool hasYesNo, bool hasOK)
|
||||
h2 += h + 5.0f;
|
||||
y = 135.0f - h;
|
||||
PPGeDrawRect(x - w, y2 - h, x + w, y2 + h, CalcFadedColor(0x6DCFCFCF));
|
||||
PPGeDrawText(d->T("Yes"), 204.0f, y2 + 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000));
|
||||
PPGeDrawText(d->T("Yes"), 203.0f, y2 - 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(yesColor));
|
||||
PPGeDrawText(d->T("No"), 273.0f, y2 + 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000));
|
||||
PPGeDrawText(d->T("No"), 272.0f, y2 - 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(noColor));
|
||||
PPGeDrawText(di->T("Yes"), 204.0f, y2 + 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000));
|
||||
PPGeDrawText(di->T("Yes"), 203.0f, y2 - 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(yesColor));
|
||||
PPGeDrawText(di->T("No"), 273.0f, y2 + 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000));
|
||||
PPGeDrawText(di->T("No"), 272.0f, y2 - 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(noColor));
|
||||
if (IsButtonPressed(CTRL_LEFT) && yesnoChoice == 0) {
|
||||
yesnoChoice = 1;
|
||||
}
|
||||
@ -192,7 +192,7 @@ void PSPMsgDialog::DisplayMessage(std::string text, bool hasYesNo, bool hasOK)
|
||||
}
|
||||
|
||||
if (hasOK) {
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
float x, w;
|
||||
x = 240.0f;
|
||||
w = 15.0f;
|
||||
@ -201,8 +201,8 @@ void PSPMsgDialog::DisplayMessage(std::string text, bool hasYesNo, bool hasOK)
|
||||
h2 += h + 5.0f;
|
||||
y = 135.0f - h;
|
||||
PPGeDrawRect(x - w, y2 - h, x + w, y2 + h, CalcFadedColor(0x6DCFCFCF));
|
||||
PPGeDrawText(d->T("OK"), 240.0f, y2 + 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000));
|
||||
PPGeDrawText(d->T("OK"), 239.0f, y2 - 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(di->T("OK"), 240.0f, y2 + 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000));
|
||||
PPGeDrawText(di->T("OK"), 239.0f, y2 - 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0xFFFFFFFF));
|
||||
ey = y2 + 25.0f;
|
||||
}
|
||||
|
||||
|
@ -62,13 +62,13 @@ void PSPNetconfDialog::DrawBanner() {
|
||||
|
||||
// TODO: Draw a hexagon icon
|
||||
PPGeDrawImage(10, 6, 12.0f, 12.0f, 1, 10, 1, 10, 10, 10, CalcFadedColor(0xFFFFFFFF));
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
PPGeDrawText(d->T("Network Connection"), 30, 11, PPGE_ALIGN_VCENTER, 0.6f, CalcFadedColor(0xFFFFFFFF));
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
PPGeDrawText(di->T("Network Connection"), 30, 11, PPGE_ALIGN_VCENTER, 0.6f, CalcFadedColor(0xFFFFFFFF));
|
||||
}
|
||||
|
||||
int PSPNetconfDialog::Update(int animSpeed) {
|
||||
UpdateButtons();
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
I18NCategory *err = GetI18NCategory("Error");
|
||||
const float WRAP_WIDTH = 254.0f;
|
||||
const int confirmBtnImage = g_Config.iButtonPreference == PSP_SYSTEMPARAM_BUTTON_CROSS ? I_CROSS : I_CIRCLE;
|
||||
@ -83,7 +83,7 @@ int PSPNetconfDialog::Update(int animSpeed) {
|
||||
PPGeDrawRect(0, 0, 480, 272, CalcFadedColor(0x63636363));
|
||||
PPGeDrawTextWrapped(err->T("PPSSPPDoesNotSupportInternet", "PPSSPP currently does not support connecting to the Internet for DLC, PSN, or game updates."), 241, 132, WRAP_WIDTH, PPGE_ALIGN_CENTER, 0.5f, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawImage(confirmBtnImage, 195, 250, 20, 20, 0, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(d->T("OK"), 225, 252, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(di->T("OK"), 225, 252, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
|
||||
|
||||
if (IsButtonPressed(confirmBtn)) {
|
||||
StartFade(false);
|
||||
|
@ -872,10 +872,10 @@ int PSPOskDialog::Update(int animSpeed) {
|
||||
PPGeDrawRect(0, 0, 480, 272, CalcFadedColor(0x63636363));
|
||||
RenderKeyboard();
|
||||
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
|
||||
PPGeDrawImage(I_SQUARE, 365, 222, 16, 16, 0, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(d->T("Space"), 390, 222, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(di->T("Space"), 390, 222, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
|
||||
|
||||
if (g_Config.iButtonPreference != PSP_SYSTEMPARAM_BUTTON_CIRCLE) {
|
||||
PPGeDrawImage(I_CROSS, 45, 222, 16, 16, 0, CalcFadedColor(0xFFFFFFFF));
|
||||
@ -885,11 +885,11 @@ int PSPOskDialog::Update(int animSpeed) {
|
||||
PPGeDrawImage(I_CROSS, 45, 247, 16, 16, 0, CalcFadedColor(0xFFFFFFFF));
|
||||
}
|
||||
|
||||
PPGeDrawText(d->T("Select"), 75, 222, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(d->T("Delete"), 75, 247, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(di->T("Select"), 75, 222, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(di->T("Delete"), 75, 247, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
|
||||
|
||||
PPGeDrawText("Start", 135, 220, PPGE_ALIGN_LEFT, 0.6f, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(d->T("Finish"), 185, 222, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(di->T("Finish"), 185, 222, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
|
||||
|
||||
int index = (currentKeyboardLanguage - 1) % OSK_LANGUAGE_COUNT;
|
||||
const char *countryCode;
|
||||
@ -908,7 +908,7 @@ int PSPOskDialog::Update(int animSpeed) {
|
||||
|
||||
if (strcmp(countryCode, "ko_KR")) {
|
||||
PPGeDrawText("Select", 135, 245, PPGE_ALIGN_LEFT, 0.6f, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(d->T("Shift"), 185, 247, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(di->T("Shift"), 185, 247, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
|
||||
}
|
||||
|
||||
PPGeDrawText("L", 235, 220, PPGE_ALIGN_LEFT, 0.6f, CalcFadedColor(0xFFFFFFFF));
|
||||
|
@ -275,19 +275,19 @@ const std::string PSPSaveDialog::GetSelectedSaveDirName() const
|
||||
|
||||
void PSPSaveDialog::DisplayBanner(int which)
|
||||
{
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
PPGeDrawRect(0, 0, 480, 23, CalcFadedColor(0x65636358));
|
||||
const char *title;
|
||||
switch (which)
|
||||
{
|
||||
case DB_SAVE:
|
||||
title = d->T("Save");
|
||||
title = di->T("Save");
|
||||
break;
|
||||
case DB_LOAD:
|
||||
title = d->T("Load");
|
||||
title = di->T("Load");
|
||||
break;
|
||||
case DB_DELETE:
|
||||
title = d->T("Delete");
|
||||
title = di->T("Delete");
|
||||
break;
|
||||
default:
|
||||
title = "";
|
||||
@ -391,8 +391,8 @@ void PSPSaveDialog::DisplaySaveDataInfo1()
|
||||
{
|
||||
lock_guard guard(paramLock);
|
||||
if (param.GetFileInfo(currentSelectedSave).size == 0) {
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
PPGeDrawText(d->T("NEW DATA"), 180, 136, PPGE_ALIGN_VCENTER, 0.6f, CalcFadedColor(0xFFFFFFFF));
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
PPGeDrawText(di->T("NEW DATA"), 180, 136, PPGE_ALIGN_VCENTER, 0.6f, CalcFadedColor(0xFFFFFFFF));
|
||||
} else {
|
||||
char title[512];
|
||||
char time[512];
|
||||
@ -524,18 +524,18 @@ void PSPSaveDialog::DisplayMessage(std::string text, bool hasYesNo)
|
||||
float h2 = h * (float)n / 2.0f;
|
||||
if (hasYesNo)
|
||||
{
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
const char *choiceText;
|
||||
u32 yesColor, noColor;
|
||||
float x, w;
|
||||
if (yesnoChoice == 1) {
|
||||
choiceText = d->T("Yes");
|
||||
choiceText = di->T("Yes");
|
||||
x = 302.0f;
|
||||
yesColor = 0xFFFFFFFF;
|
||||
noColor = 0xFFFFFFFF;
|
||||
}
|
||||
else {
|
||||
choiceText = d->T("No");
|
||||
choiceText = di->T("No");
|
||||
x = 366.0f;
|
||||
yesColor = 0xFFFFFFFF;
|
||||
noColor = 0xFFFFFFFF;
|
||||
@ -547,10 +547,10 @@ void PSPSaveDialog::DisplayMessage(std::string text, bool hasYesNo)
|
||||
h2 += h + 4.0f;
|
||||
y = 132.0f - h;
|
||||
PPGeDrawRect(x - w, y2 - h, x + w, y2 + h, CalcFadedColor(0x40C0C0C0));
|
||||
PPGeDrawText(d->T("Yes"), 303.0f, y2+2, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000));
|
||||
PPGeDrawText(d->T("Yes"), 302.0f, y2, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(yesColor));
|
||||
PPGeDrawText(d->T("No"), 367.0f, y2+2, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000));
|
||||
PPGeDrawText(d->T("No"), 366.0f, y2, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(noColor));
|
||||
PPGeDrawText(di->T("Yes"), 303.0f, y2+2, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000));
|
||||
PPGeDrawText(di->T("Yes"), 302.0f, y2, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(yesColor));
|
||||
PPGeDrawText(di->T("No"), 367.0f, y2+2, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000));
|
||||
PPGeDrawText(di->T("No"), 366.0f, y2, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(noColor));
|
||||
if (IsButtonPressed(CTRL_LEFT) && yesnoChoice == 0) {
|
||||
yesnoChoice = 1;
|
||||
}
|
||||
@ -606,7 +606,7 @@ int PSPSaveDialog::Update(int animSpeed)
|
||||
cancelButtonFlag = CTRL_CIRCLE;
|
||||
}
|
||||
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
|
||||
switch (display)
|
||||
{
|
||||
@ -640,7 +640,7 @@ int PSPSaveDialog::Update(int animSpeed)
|
||||
DisplaySaveIcon();
|
||||
DisplaySaveDataInfo2();
|
||||
|
||||
DisplayMessage(d->T("Confirm Save", "Do you want to save this data?"), true);
|
||||
DisplayMessage(di->T("Confirm Save", "Do you want to save this data?"), true);
|
||||
|
||||
DisplayButtons(DS_BUTTON_OK | DS_BUTTON_CANCEL);
|
||||
DisplayBanner(DB_SAVE);
|
||||
@ -661,7 +661,7 @@ int PSPSaveDialog::Update(int animSpeed)
|
||||
DisplaySaveIcon();
|
||||
DisplaySaveDataInfo2();
|
||||
|
||||
DisplayMessage(d->T("Confirm Overwrite","Do you want to overwrite the data?"), true);
|
||||
DisplayMessage(di->T("Confirm Overwrite","Do you want to overwrite the data?"), true);
|
||||
|
||||
DisplayButtons(DS_BUTTON_OK | DS_BUTTON_CANCEL);
|
||||
DisplayBanner(DB_SAVE);
|
||||
@ -690,7 +690,7 @@ int PSPSaveDialog::Update(int animSpeed)
|
||||
DisplaySaveIcon();
|
||||
DisplaySaveDataInfo2();
|
||||
|
||||
DisplayMessage(d->T("Saving","Saving\nPlease Wait..."));
|
||||
DisplayMessage(di->T("Saving","Saving\nPlease Wait..."));
|
||||
|
||||
DisplayBanner(DB_SAVE);
|
||||
|
||||
@ -703,7 +703,7 @@ int PSPSaveDialog::Update(int animSpeed)
|
||||
DisplaySaveIcon();
|
||||
DisplaySaveDataInfo2();
|
||||
|
||||
DisplayMessage(d->T("SavingFailed", "Unable to save data."));
|
||||
DisplayMessage(di->T("SavingFailed", "Unable to save data."));
|
||||
|
||||
DisplayButtons(DS_BUTTON_CANCEL);
|
||||
DisplayBanner(DB_SAVE);
|
||||
@ -730,7 +730,7 @@ int PSPSaveDialog::Update(int animSpeed)
|
||||
DisplaySaveIcon();
|
||||
DisplaySaveDataInfo2();
|
||||
|
||||
DisplayMessage(d->T("Save completed"));
|
||||
DisplayMessage(di->T("Save completed"));
|
||||
|
||||
DisplayButtons(DS_BUTTON_CANCEL);
|
||||
DisplayBanner(DB_SAVE);
|
||||
@ -770,7 +770,7 @@ int PSPSaveDialog::Update(int animSpeed)
|
||||
DisplaySaveIcon();
|
||||
DisplaySaveDataInfo2();
|
||||
|
||||
DisplayMessage(d->T("ConfirmLoad", "Load this data?"), true);
|
||||
DisplayMessage(di->T("ConfirmLoad", "Load this data?"), true);
|
||||
|
||||
DisplayButtons(DS_BUTTON_OK | DS_BUTTON_CANCEL);
|
||||
DisplayBanner(DB_LOAD);
|
||||
@ -795,7 +795,7 @@ int PSPSaveDialog::Update(int animSpeed)
|
||||
DisplaySaveIcon();
|
||||
DisplaySaveDataInfo2();
|
||||
|
||||
DisplayMessage(d->T("Loading","Loading\nPlease Wait..."));
|
||||
DisplayMessage(di->T("Loading","Loading\nPlease Wait..."));
|
||||
|
||||
DisplayBanner(DB_LOAD);
|
||||
|
||||
@ -808,7 +808,7 @@ int PSPSaveDialog::Update(int animSpeed)
|
||||
DisplaySaveIcon();
|
||||
DisplaySaveDataInfo2();
|
||||
|
||||
DisplayMessage(d->T("LoadingFailed", "Unable to load data."));
|
||||
DisplayMessage(di->T("LoadingFailed", "Unable to load data."));
|
||||
|
||||
DisplayButtons(DS_BUTTON_CANCEL);
|
||||
DisplayBanner(DB_LOAD);
|
||||
@ -832,7 +832,7 @@ int PSPSaveDialog::Update(int animSpeed)
|
||||
DisplaySaveIcon();
|
||||
DisplaySaveDataInfo2();
|
||||
|
||||
DisplayMessage(d->T("Load completed"));
|
||||
DisplayMessage(di->T("Load completed"));
|
||||
|
||||
DisplayButtons(DS_BUTTON_CANCEL);
|
||||
DisplayBanner(DB_LOAD);
|
||||
@ -852,7 +852,7 @@ int PSPSaveDialog::Update(int animSpeed)
|
||||
case DS_LOAD_NODATA:
|
||||
StartDraw();
|
||||
|
||||
DisplayMessage(d->T("There is no data"));
|
||||
DisplayMessage(di->T("There is no data"));
|
||||
|
||||
DisplayButtons(DS_BUTTON_CANCEL);
|
||||
DisplayBanner(DB_LOAD);
|
||||
@ -890,7 +890,7 @@ int PSPSaveDialog::Update(int animSpeed)
|
||||
DisplaySaveIcon();
|
||||
DisplaySaveDataInfo2();
|
||||
|
||||
DisplayMessage(d->T("DeleteConfirm",
|
||||
DisplayMessage(di->T("DeleteConfirm",
|
||||
"This save data will be deleted.\nAre you sure you want to continue?"),
|
||||
true);
|
||||
|
||||
@ -917,7 +917,7 @@ int PSPSaveDialog::Update(int animSpeed)
|
||||
|
||||
StartDraw();
|
||||
|
||||
DisplayMessage(d->T("Deleting","Deleting\nPlease Wait..."));
|
||||
DisplayMessage(di->T("Deleting","Deleting\nPlease Wait..."));
|
||||
|
||||
DisplayBanner(DB_DELETE);
|
||||
|
||||
@ -927,7 +927,7 @@ int PSPSaveDialog::Update(int animSpeed)
|
||||
JoinIOThread();
|
||||
StartDraw();
|
||||
|
||||
DisplayMessage(d->T("DeleteFailed", "Unable to delete data."));
|
||||
DisplayMessage(di->T("DeleteFailed", "Unable to delete data."));
|
||||
|
||||
DisplayButtons(DS_BUTTON_CANCEL);
|
||||
DisplayBanner(DB_DELETE);
|
||||
@ -945,7 +945,7 @@ int PSPSaveDialog::Update(int animSpeed)
|
||||
}
|
||||
StartDraw();
|
||||
|
||||
DisplayMessage(d->T("Delete completed"));
|
||||
DisplayMessage(di->T("Delete completed"));
|
||||
|
||||
DisplayButtons(DS_BUTTON_CANCEL);
|
||||
DisplayBanner(DB_DELETE);
|
||||
@ -962,7 +962,7 @@ int PSPSaveDialog::Update(int animSpeed)
|
||||
case DS_DELETE_NODATA:
|
||||
StartDraw();
|
||||
|
||||
DisplayMessage(d->T("There is no data"));
|
||||
DisplayMessage(di->T("There is no data"));
|
||||
|
||||
DisplayButtons(DS_BUTTON_CANCEL);
|
||||
DisplayBanner(DB_DELETE);
|
||||
|
@ -641,9 +641,9 @@ void SavedataParam::LoadCryptedSave(SceUtilitySavedataParam *param, u8 *data, u8
|
||||
|
||||
// Don't notify the user if we're not going to upgrade the save.
|
||||
if (!g_Config.bEncryptSave) {
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
osm.Show(d->T("When you save, it will load on a PSP, but not an older PPSSPP"), 6.0f);
|
||||
osm.Show(d->T("Old savedata detected"), 6.0f);
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
osm.Show(di->T("When you save, it will load on a PSP, but not an older PPSSPP"), 6.0f);
|
||||
osm.Show(di->T("Old savedata detected"), 6.0f);
|
||||
}
|
||||
} else {
|
||||
if (decryptMode == 5 && prevCryptMode == 3) {
|
||||
|
@ -357,7 +357,7 @@ namespace SaveState
|
||||
SaveScreenshot(shot, Callback(), 0);
|
||||
Save(fn + ".tmp", renameCallback, cbUserData);
|
||||
} else {
|
||||
I18NCategory *s = GetI18NCategory("Screen");
|
||||
I18NCategory *sc = GetI18NCategory("Screen");
|
||||
osm.Show("Failed to save state. Error in the file system.", 2.0);
|
||||
if (callback)
|
||||
callback(false, cbUserData);
|
||||
@ -508,14 +508,13 @@ namespace SaveState
|
||||
bool callbackResult;
|
||||
std::string reason;
|
||||
|
||||
I18NCategory *s = GetI18NCategory("Screen");
|
||||
// I couldn't stand the inconsistency. But trying not to break old lang files.
|
||||
const char *i18nLoadFailure = s->T("Load savestate failed", "");
|
||||
const char *i18nSaveFailure = s->T("Save State Failed", "");
|
||||
I18NCategory *sc = GetI18NCategory("Screen");
|
||||
const char *i18nLoadFailure = sc->T("Load savestate failed", "");
|
||||
const char *i18nSaveFailure = sc->T("Save State Failed", "");
|
||||
if (strlen(i18nLoadFailure) == 0)
|
||||
i18nLoadFailure = s->T("Failed to load state");
|
||||
i18nLoadFailure = sc->T("Failed to load state");
|
||||
if (strlen(i18nSaveFailure) == 0)
|
||||
i18nSaveFailure = s->T("Failed to save state");
|
||||
i18nSaveFailure = sc->T("Failed to save state");
|
||||
|
||||
switch (op.type)
|
||||
{
|
||||
@ -523,7 +522,7 @@ namespace SaveState
|
||||
INFO_LOG(COMMON, "Loading state from %s", op.filename.c_str());
|
||||
result = CChunkFileReader::Load(op.filename, REVISION, PPSSPP_GIT_VERSION, state, &reason);
|
||||
if (result == CChunkFileReader::ERROR_NONE) {
|
||||
osm.Show(s->T("Loaded State"), 2.0);
|
||||
osm.Show(sc->T("Loaded State"), 2.0);
|
||||
callbackResult = true;
|
||||
hasLoadedState = true;
|
||||
} else if (result == CChunkFileReader::ERROR_BROKEN_STATE) {
|
||||
@ -532,7 +531,7 @@ namespace SaveState
|
||||
ERROR_LOG(COMMON, "Load state failure: %s", reason.c_str());
|
||||
callbackResult = false;
|
||||
} else {
|
||||
osm.Show(s->T(reason.c_str(), i18nLoadFailure), 2.0);
|
||||
osm.Show(sc->T(reason.c_str(), i18nLoadFailure), 2.0);
|
||||
callbackResult = false;
|
||||
}
|
||||
break;
|
||||
@ -542,7 +541,7 @@ namespace SaveState
|
||||
result = CChunkFileReader::Save(op.filename, REVISION, PPSSPP_GIT_VERSION, state);
|
||||
if (result == CChunkFileReader::ERROR_NONE) {
|
||||
|
||||
osm.Show(s->T("Saved State"), 2.0);
|
||||
osm.Show(sc->T("Saved State"), 2.0);
|
||||
callbackResult = true;
|
||||
} else if (result == CChunkFileReader::ERROR_BROKEN_STATE) {
|
||||
HandleFailure();
|
||||
@ -564,14 +563,14 @@ namespace SaveState
|
||||
INFO_LOG(COMMON, "Rewinding to recent savestate snapshot");
|
||||
result = rewindStates.Restore();
|
||||
if (result == CChunkFileReader::ERROR_NONE) {
|
||||
osm.Show(s->T("Loaded State"), 2.0);
|
||||
osm.Show(sc->T("Loaded State"), 2.0);
|
||||
callbackResult = true;
|
||||
hasLoadedState = true;
|
||||
} else if (result == CChunkFileReader::ERROR_BROKEN_STATE) {
|
||||
// Cripes. Good news is, we might have more. Let's try those too, better than a reset.
|
||||
if (HandleFailure()) {
|
||||
// Well, we did rewind, even if too much...
|
||||
osm.Show(s->T("Loaded State"), 2.0);
|
||||
osm.Show(sc->T("Loaded State"), 2.0);
|
||||
callbackResult = true;
|
||||
hasLoadedState = true;
|
||||
} else {
|
||||
|
@ -121,7 +121,7 @@ bool GameManager::InstallGame(std::string zipfile, bool deleteAfter) {
|
||||
return false;
|
||||
}
|
||||
|
||||
I18NCategory *s = GetI18NCategory("System");
|
||||
I18NCategory *sy = GetI18NCategory("System");
|
||||
installInProgress_ = true;
|
||||
|
||||
std::string pspGame = GetSysDirectory(DIRECTORY_GAME);
|
||||
@ -180,7 +180,7 @@ bool GameManager::InstallGame(std::string zipfile, bool deleteAfter) {
|
||||
ERROR_LOG(HLE, "File not a PSP game, no EBOOT.PBP found.");
|
||||
installProgress_ = 0.0f;
|
||||
installInProgress_ = false;
|
||||
installError_ = s->T("Not a PSP game");
|
||||
installError_ = sy->T("Not a PSP game");
|
||||
InstallDone();
|
||||
return false;
|
||||
}
|
||||
@ -284,7 +284,7 @@ bail:
|
||||
// We end up here if disk is full or couldn't write to storage for some other reason.
|
||||
installProgress_ = 0.0f;
|
||||
installInProgress_ = false;
|
||||
installError_ = s->T("Storage full");
|
||||
installError_ = sy->T("Storage full");
|
||||
if (deleteAfter) {
|
||||
deleteFile(zipfile.c_str());
|
||||
}
|
||||
|
@ -783,9 +783,9 @@ Shader *ShaderManager::ApplyVertexShader(int prim, u32 vertType) {
|
||||
vs = new Shader(codeBuffer_, GL_VERTEX_SHADER, useHWTransform, VSID);
|
||||
|
||||
if (vs->Failed()) {
|
||||
I18NCategory *gs = GetI18NCategory("Graphics");
|
||||
I18NCategory *gr = GetI18NCategory("Graphics");
|
||||
ERROR_LOG(G3D, "Shader compilation failed, falling back to software transform");
|
||||
osm.Show(gs->T("hardware transform error - falling back to software"), 2.5f, 0xFF3030FF, -1, true);
|
||||
osm.Show(gr->T("hardware transform error - falling back to software"), 2.5f, 0xFF3030FF, -1, true);
|
||||
delete vs;
|
||||
|
||||
// TODO: Look for existing shader with the appropriate ID, use that instead of generating a new one - however, need to make sure
|
||||
|
@ -202,20 +202,20 @@ void ControlMappingScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
mappers_.clear();
|
||||
|
||||
I18NCategory *k = GetI18NCategory("KeyMapping");
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *km = GetI18NCategory("KeyMapping");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
|
||||
root_ = new LinearLayout(ORIENT_HORIZONTAL);
|
||||
|
||||
LinearLayout *leftColumn = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(200, FILL_PARENT));
|
||||
leftColumn->Add(new Choice(k->T("Clear All")))->OnClick.Handle(this, &ControlMappingScreen::OnClearMapping);
|
||||
leftColumn->Add(new Choice(k->T("Default All")))->OnClick.Handle(this, &ControlMappingScreen::OnDefaultMapping);
|
||||
leftColumn->Add(new Choice(km->T("Clear All")))->OnClick.Handle(this, &ControlMappingScreen::OnClearMapping);
|
||||
leftColumn->Add(new Choice(km->T("Default All")))->OnClick.Handle(this, &ControlMappingScreen::OnDefaultMapping);
|
||||
if (KeyMap::GetSeenPads().size()) {
|
||||
leftColumn->Add(new Choice(k->T("Autoconfigure")))->OnClick.Handle(this, &ControlMappingScreen::OnAutoConfigure);
|
||||
leftColumn->Add(new Choice(km->T("Autoconfigure")))->OnClick.Handle(this, &ControlMappingScreen::OnAutoConfigure);
|
||||
}
|
||||
leftColumn->Add(new Choice(k->T("Test Analogs")))->OnClick.Handle(this, &ControlMappingScreen::OnTestAnalogs);
|
||||
leftColumn->Add(new Choice(km->T("Test Analogs")))->OnClick.Handle(this, &ControlMappingScreen::OnTestAnalogs);
|
||||
leftColumn->Add(new Spacer(new LinearLayoutParams(1.0f)));
|
||||
leftColumn->Add(new Choice(d->T("Back")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
leftColumn->Add(new Choice(di->T("Back")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
|
||||
rightScroll_ = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(1.0f));
|
||||
rightScroll_->SetScrollToTop(false);
|
||||
@ -260,8 +260,8 @@ UI::EventReturn ControlMappingScreen::OnAutoConfigure(UI::EventParams ¶ms) {
|
||||
for (auto s = seenPads.begin(), end = seenPads.end(); s != end; ++s) {
|
||||
items.push_back(*s);
|
||||
}
|
||||
I18NCategory *keyI18N = GetI18NCategory("KeyMapping");
|
||||
ListPopupScreen *autoConfList = new ListPopupScreen(keyI18N->T("Autoconfigure for device"), items, -1);
|
||||
I18NCategory *km = GetI18NCategory("KeyMapping");
|
||||
ListPopupScreen *autoConfList = new ListPopupScreen(km->T("Autoconfigure for device"), items, -1);
|
||||
screenManager()->push(autoConfList);
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
@ -289,11 +289,11 @@ void ControlMappingScreen::KeyMapped(int pspkey) { // Notification to let us re
|
||||
void KeyMappingNewKeyDialog::CreatePopupContents(UI::ViewGroup *parent) {
|
||||
using namespace UI;
|
||||
|
||||
I18NCategory *keyI18N = GetI18NCategory("KeyMapping");
|
||||
I18NCategory *km = GetI18NCategory("KeyMapping");
|
||||
|
||||
std::string pspButtonName = KeyMap::GetPspButtonName(this->pspBtn_);
|
||||
|
||||
parent->Add(new TextView(std::string(keyI18N->T("Map a new key for")) + " " + pspButtonName, new LinearLayoutParams(Margins(10,0))));
|
||||
parent->Add(new TextView(std::string(km->T("Map a new key for")) + " " + pspButtonName, new LinearLayoutParams(Margins(10,0))));
|
||||
}
|
||||
|
||||
bool KeyMappingNewKeyDialog::key(const KeyInput &key) {
|
||||
@ -435,7 +435,7 @@ bool AnalogTestScreen::key(const KeyInput &key) {
|
||||
void AnalogTestScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
|
||||
root_ = new LinearLayout(ORIENT_VERTICAL);
|
||||
|
||||
@ -458,5 +458,5 @@ void AnalogTestScreen::CreateViews() {
|
||||
|
||||
lastKeyEvent_ = root_->Add(new TextView("", new LayoutParams(FILL_PARENT, WRAP_CONTENT)));
|
||||
|
||||
root_->Add(new Button(d->T("Back")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
root_->Add(new Button(di->T("Back")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
}
|
||||
|
@ -60,23 +60,23 @@ void CwCheatScreen::CreateCodeList() {
|
||||
|
||||
void CwCheatScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
I18NCategory *k = GetI18NCategory("CwCheats");
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *cw = GetI18NCategory("CwCheats");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
CreateCodeList();
|
||||
g_Config.bReloadCheats = true;
|
||||
root_ = new LinearLayout(ORIENT_HORIZONTAL);
|
||||
Margins actionMenuMargins(50, -15, 15, 0);
|
||||
|
||||
LinearLayout *leftColumn = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(400, FILL_PARENT));
|
||||
leftColumn->Add(new ItemHeader(k->T("Options")));
|
||||
leftColumn->Add(new Choice(d->T("Back")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
//leftColumn->Add(new Choice(k->T("Add Cheat")))->OnClick.Handle(this, &CwCheatScreen::OnAddCheat);
|
||||
leftColumn->Add(new Choice(k->T("Import Cheats")))->OnClick.Handle(this, &CwCheatScreen::OnImportCheat);
|
||||
leftColumn->Add(new ItemHeader(cw->T("Options")));
|
||||
leftColumn->Add(new Choice(di->T("Back")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
//leftColumn->Add(new Choice(cw->T("Add Cheat")))->OnClick.Handle(this, &CwCheatScreen::OnAddCheat);
|
||||
leftColumn->Add(new Choice(cw->T("Import Cheats")))->OnClick.Handle(this, &CwCheatScreen::OnImportCheat);
|
||||
#if !defined(MOBILE_DEVICE)
|
||||
leftColumn->Add(new Choice(k->T("Edit Cheat File")))->OnClick.Handle(this, &CwCheatScreen::OnEditCheatFile);
|
||||
leftColumn->Add(new Choice(cw->T("Edit Cheat File")))->OnClick.Handle(this, &CwCheatScreen::OnEditCheatFile);
|
||||
#endif
|
||||
leftColumn->Add(new Choice(k->T("Enable/Disable All")))->OnClick.Handle(this, &CwCheatScreen::OnEnableAll);
|
||||
leftColumn->Add(new PopupSliderChoice(&g_Config.iCwCheatRefreshRate, 1, 1000, k->T("Refresh Rate"), 1, screenManager()));
|
||||
leftColumn->Add(new Choice(cw->T("Enable/Disable All")))->OnClick.Handle(this, &CwCheatScreen::OnEnableAll);
|
||||
leftColumn->Add(new PopupSliderChoice(&g_Config.iCwCheatRefreshRate, 1, 1000, cw->T("Refresh Rate"), 1, screenManager()));
|
||||
|
||||
ScrollView *rightScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(0.5f));
|
||||
rightScroll->SetScrollToTop(false);
|
||||
@ -86,10 +86,10 @@ void CwCheatScreen::CreateViews() {
|
||||
|
||||
root_->Add(leftColumn);
|
||||
root_->Add(rightScroll);
|
||||
rightColumn->Add(new ItemHeader(k->T("Cheats")));
|
||||
rightColumn->Add(new ItemHeader(cw->T("Cheats")));
|
||||
for (size_t i = 0; i < formattedList_.size(); i++) {
|
||||
name = formattedList_[i].c_str();
|
||||
rightColumn->Add(new CheatCheckBox(&bEnableCheat[i], k->T(name), ""))->OnClick.Handle(this, &CwCheatScreen::OnCheckBox);
|
||||
rightColumn->Add(new CheatCheckBox(&bEnableCheat[i], cw->T(name), ""))->OnClick.Handle(this, &CwCheatScreen::OnCheckBox);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -300,7 +300,7 @@ const char *GetCompilerABI() {
|
||||
|
||||
void SystemInfoScreen::CreateViews() {
|
||||
// NOTE: Do not translate this section. It will change a lot and will be impossible to keep up.
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
|
||||
using namespace UI;
|
||||
root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
@ -308,7 +308,7 @@ void SystemInfoScreen::CreateViews() {
|
||||
ViewGroup *leftColumn = new AnchorLayout(new LinearLayoutParams(1.0f));
|
||||
root_->Add(leftColumn);
|
||||
|
||||
root_->Add(new Choice(d->T("Back"), "", false, new AnchorLayoutParams(225, 64, 10, NONE, NONE, 10)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
root_->Add(new Choice(di->T("Back"), "", false, new AnchorLayoutParams(225, 64, 10, NONE, NONE, 10)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
|
||||
TabHolder *tabHolder = new TabHolder(ORIENT_VERTICAL, 225, new AnchorLayoutParams(10, 0, 10, 0, false));
|
||||
|
||||
@ -544,7 +544,7 @@ bool AddressPromptScreen::key(const KeyInput &key) {
|
||||
|
||||
// Three panes: Block chooser, MIPS view, ARM/x86 view
|
||||
void JitCompareScreen::CreateViews() {
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
I18NCategory *dev = GetI18NCategory("Developer");
|
||||
|
||||
using namespace UI;
|
||||
@ -572,7 +572,7 @@ void JitCompareScreen::CreateViews() {
|
||||
leftColumn->Add(new Choice(dev->T("FPU")))->OnClick.Handle(this, &JitCompareScreen::OnRandomFPUBlock);
|
||||
leftColumn->Add(new Choice(dev->T("VFPU")))->OnClick.Handle(this, &JitCompareScreen::OnRandomVFPUBlock);
|
||||
leftColumn->Add(new Choice(dev->T("Stats")))->OnClick.Handle(this, &JitCompareScreen::OnShowStats);
|
||||
leftColumn->Add(new Choice(d->T("Back")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
leftColumn->Add(new Choice(di->T("Back")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
blockName_ = leftColumn->Add(new TextView(dev->T("No block")));
|
||||
blockAddr_ = leftColumn->Add(new TextEdit("", "", new LayoutParams(FILL_PARENT, WRAP_CONTENT)));
|
||||
blockAddr_->OnTextChange.Handle(this, &JitCompareScreen::OnAddressChange);
|
||||
|
@ -142,11 +142,11 @@ void EmuScreen::bootComplete() {
|
||||
NOTICE_LOG(BOOT, "Loading %s...", PSP_CoreParameter().fileToStart.c_str());
|
||||
autoLoad();
|
||||
|
||||
I18NCategory *s = GetI18NCategory("Screen");
|
||||
I18NCategory *sc = GetI18NCategory("Screen");
|
||||
|
||||
#ifndef MOBILE_DEVICE
|
||||
if (g_Config.bFirstRun) {
|
||||
osm.Show(s->T("PressESC", "Press ESC to open the pause menu"), 3.0f);
|
||||
osm.Show(sc->T("PressESC", "Press ESC to open the pause menu"), 3.0f);
|
||||
}
|
||||
#endif
|
||||
memset(virtKeys, 0, sizeof(virtKeys));
|
||||
@ -154,9 +154,9 @@ void EmuScreen::bootComplete() {
|
||||
if (g_Config.iGPUBackend == GPU_BACKEND_OPENGL) {
|
||||
const char *renderer = (const char*)glGetString(GL_RENDERER);
|
||||
if (strstr(renderer, "Chainfire3D") != 0) {
|
||||
osm.Show(s->T("Chainfire3DWarning", "WARNING: Chainfire3D detected, may cause problems"), 10.0f, 0xFF30a0FF, -1, true);
|
||||
osm.Show(sc->T("Chainfire3DWarning", "WARNING: Chainfire3D detected, may cause problems"), 10.0f, 0xFF30a0FF, -1, true);
|
||||
} else if (strstr(renderer, "GLTools") != 0) {
|
||||
osm.Show(s->T("GLToolsWarning", "WARNING: GLTools detected, may cause problems"), 10.0f, 0xFF30a0FF, -1, true);
|
||||
osm.Show(sc->T("GLToolsWarning", "WARNING: GLTools detected, may cause problems"), 10.0f, 0xFF30a0FF, -1, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -303,7 +303,7 @@ bool EmuScreen::touch(const TouchInput &touch) {
|
||||
}
|
||||
|
||||
void EmuScreen::onVKeyDown(int virtualKeyCode) {
|
||||
I18NCategory *s = GetI18NCategory("Screen");
|
||||
I18NCategory *sc = GetI18NCategory("Screen");
|
||||
|
||||
switch (virtualKeyCode) {
|
||||
case VIRTKEY_UNTHROTTLE:
|
||||
@ -313,11 +313,11 @@ void EmuScreen::onVKeyDown(int virtualKeyCode) {
|
||||
case VIRTKEY_SPEED_TOGGLE:
|
||||
if (PSP_CoreParameter().fpsLimit == 0) {
|
||||
PSP_CoreParameter().fpsLimit = 1;
|
||||
osm.Show(s->T("fixed", "Speed: alternate"), 1.0);
|
||||
osm.Show(sc->T("fixed", "Speed: alternate"), 1.0);
|
||||
}
|
||||
else if (PSP_CoreParameter().fpsLimit == 1) {
|
||||
PSP_CoreParameter().fpsLimit = 0;
|
||||
osm.Show(s->T("standard", "Speed: standard"), 1.0);
|
||||
osm.Show(sc->T("standard", "Speed: standard"), 1.0);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -358,7 +358,7 @@ void EmuScreen::onVKeyDown(int virtualKeyCode) {
|
||||
if (SaveState::CanRewind()) {
|
||||
SaveState::Rewind();
|
||||
} else {
|
||||
osm.Show(s->T("norewind", "No rewind save states available"), 2.0);
|
||||
osm.Show(sc->T("norewind", "No rewind save states available"), 2.0);
|
||||
}
|
||||
break;
|
||||
case VIRTKEY_SAVE_STATE:
|
||||
@ -695,11 +695,11 @@ void EmuScreen::update(InputState &input) {
|
||||
quit_ = true;
|
||||
return;
|
||||
}
|
||||
I18NCategory *g = GetI18NCategory("Error");
|
||||
std::string errLoadingFile = g->T("Error loading file", "Could not load game");
|
||||
I18NCategory *err = GetI18NCategory("Error");
|
||||
std::string errLoadingFile = err->T("Error loading file", "Could not load game");
|
||||
|
||||
errLoadingFile.append(" ");
|
||||
errLoadingFile.append(g->T(errorMessage_.c_str()));
|
||||
errLoadingFile.append(err->T(errorMessage_.c_str()));
|
||||
|
||||
screenManager()->push(new PromptScreen(errLoadingFile, "OK", ""));
|
||||
errorMessage_ = "";
|
||||
|
@ -47,7 +47,7 @@ GameScreen::~GameScreen() {
|
||||
void GameScreen::CreateViews() {
|
||||
GameInfo *info = g_gameInfoCache.GetInfo(NULL, gamePath_, GAMEINFO_WANTBG | GAMEINFO_WANTSIZE);
|
||||
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
I18NCategory *ga = GetI18NCategory("Game");
|
||||
|
||||
// Information in the top left.
|
||||
@ -62,7 +62,7 @@ void GameScreen::CreateViews() {
|
||||
ViewGroup *leftColumn = new AnchorLayout(new LinearLayoutParams(1.0f));
|
||||
root_->Add(leftColumn);
|
||||
|
||||
leftColumn->Add(new Choice(d->T("Back"), "", false, new AnchorLayoutParams(150, WRAP_CONTENT, 10, NONE, NONE, 10)))->OnClick.Handle(this, &GameScreen::OnSwitchBack);
|
||||
leftColumn->Add(new Choice(di->T("Back"), "", false, new AnchorLayoutParams(150, WRAP_CONTENT, 10, NONE, NONE, 10)))->OnClick.Handle(this, &GameScreen::OnSwitchBack);
|
||||
if (info) {
|
||||
texvGameIcon_ = leftColumn->Add(new Thin3DTextureView(0, IS_DEFAULT, new AnchorLayoutParams(144 * 2, 80 * 2, 10, 10, NONE, NONE)));
|
||||
tvTitle_ = leftColumn->Add(new TextView(info->title, ALIGN_LEFT, false, new AnchorLayoutParams(10, 200, NONE, NONE)));
|
||||
@ -137,10 +137,10 @@ void GameScreen::CallbackDeleteConfig(bool yes)
|
||||
|
||||
UI::EventReturn GameScreen::OnDeleteConfig(UI::EventParams &e)
|
||||
{
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
I18NCategory *ga = GetI18NCategory("Game");
|
||||
screenManager()->push(
|
||||
new PromptScreen(d->T("DeleteConfirmGameConfig", "Do you really want to delete the settings for this game?"), ga->T("ConfirmDelete"), d->T("Cancel"),
|
||||
new PromptScreen(di->T("DeleteConfirmGameConfig", "Do you really want to delete the settings for this game?"), ga->T("ConfirmDelete"), di->T("Cancel"),
|
||||
std::bind(&GameScreen::CallbackDeleteConfig, this, placeholder::_1)));
|
||||
|
||||
return UI::EVENT_DONE;
|
||||
@ -223,7 +223,7 @@ UI::EventReturn GameScreen::OnGameSettings(UI::EventParams &e) {
|
||||
}
|
||||
|
||||
UI::EventReturn GameScreen::OnDeleteSaveData(UI::EventParams &e) {
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
I18NCategory *ga = GetI18NCategory("Game");
|
||||
GameInfo *info = g_gameInfoCache.GetInfo(NULL, gamePath_, GAMEINFO_WANTBG | GAMEINFO_WANTSIZE);
|
||||
if (info) {
|
||||
@ -231,7 +231,7 @@ UI::EventReturn GameScreen::OnDeleteSaveData(UI::EventParams &e) {
|
||||
std::vector<std::string> saveDirs = info->GetSaveDataDirectories();
|
||||
if (saveDirs.size()) {
|
||||
screenManager()->push(
|
||||
new PromptScreen(d->T("DeleteConfirmAll", "Do you really want to delete all\nyour save data for this game?"), ga->T("ConfirmDelete"), d->T("Cancel"),
|
||||
new PromptScreen(di->T("DeleteConfirmAll", "Do you really want to delete all\nyour save data for this game?"), ga->T("ConfirmDelete"), di->T("Cancel"),
|
||||
std::bind(&GameScreen::CallbackDeleteSaveData, this, placeholder::_1)));
|
||||
}
|
||||
}
|
||||
@ -250,12 +250,12 @@ void GameScreen::CallbackDeleteSaveData(bool yes) {
|
||||
}
|
||||
|
||||
UI::EventReturn GameScreen::OnDeleteGame(UI::EventParams &e) {
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
I18NCategory *ga = GetI18NCategory("Game");
|
||||
GameInfo *info = g_gameInfoCache.GetInfo(NULL, gamePath_, GAMEINFO_WANTBG | GAMEINFO_WANTSIZE);
|
||||
if (info) {
|
||||
screenManager()->push(
|
||||
new PromptScreen(d->T("DeleteConfirmGame", "Do you really want to delete this game\nfrom your device? You can't undo this."), ga->T("ConfirmDelete"), d->T("Cancel"),
|
||||
new PromptScreen(di->T("DeleteConfirmGame", "Do you really want to delete this game\nfrom your device? You can't undo this."), ga->T("ConfirmDelete"), di->T("Cancel"),
|
||||
std::bind(&GameScreen::CallbackDeleteGame, this, placeholder::_1)));
|
||||
}
|
||||
|
||||
|
@ -91,12 +91,12 @@ void GameSettingsScreen::CreateViews() {
|
||||
// Scrolling action menu to the right.
|
||||
using namespace UI;
|
||||
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *gs = GetI18NCategory("Graphics");
|
||||
I18NCategory *c = GetI18NCategory("Controls");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
I18NCategory *gr = GetI18NCategory("Graphics");
|
||||
I18NCategory *co = GetI18NCategory("Controls");
|
||||
I18NCategory *a = GetI18NCategory("Audio");
|
||||
I18NCategory *sa = GetI18NCategory("Savedata");
|
||||
I18NCategory *s = GetI18NCategory("System");
|
||||
I18NCategory *sy = GetI18NCategory("System");
|
||||
I18NCategory *n = GetI18NCategory("Networking");
|
||||
I18NCategory *ms = GetI18NCategory("MainSettings");
|
||||
I18NCategory *dev = GetI18NCategory("Developer");
|
||||
@ -111,11 +111,11 @@ void GameSettingsScreen::CreateViews() {
|
||||
if (vertical) {
|
||||
tabHolder = new TabHolder(ORIENT_HORIZONTAL, 200, new LinearLayoutParams(1.0f));
|
||||
root_->Add(tabHolder);
|
||||
root_->Add(new Choice(d->T("Back"), "", false, new LinearLayoutParams(0.0f)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
root_->Add(new Choice(di->T("Back"), "", false, new LinearLayoutParams(0.0f)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
} else {
|
||||
tabHolder = new TabHolder(ORIENT_VERTICAL, 200, new AnchorLayoutParams(10, 0, 10, 0, false));
|
||||
root_->Add(tabHolder);
|
||||
root_->Add(new Choice(d->T("Back"), "", false, new AnchorLayoutParams(150, 64, 10, NONE, NONE, 10)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
root_->Add(new Choice(di->T("Back"), "", false, new AnchorLayoutParams(150, 64, 10, NONE, NONE, 10)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
}
|
||||
root_->SetDefaultFocusView(tabHolder);
|
||||
|
||||
@ -128,64 +128,64 @@ void GameSettingsScreen::CreateViews() {
|
||||
graphicsSettingsScroll->Add(graphicsSettings);
|
||||
tabHolder->AddTab(ms->T("Graphics"), graphicsSettingsScroll);
|
||||
|
||||
graphicsSettings->Add(new ItemHeader(gs->T("Rendering Mode")));
|
||||
graphicsSettings->Add(new ItemHeader(gr->T("Rendering Mode")));
|
||||
#if defined(_WIN32)
|
||||
static const char *renderingBackend[] = { "OpenGL", "Direct3D9" };
|
||||
PopupMultiChoice *renderingBackendChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTempGPUBackend, gs->T("Backend"), renderingBackend, GPU_BACKEND_OPENGL, ARRAY_SIZE(renderingBackend), gs, screenManager()));
|
||||
PopupMultiChoice *renderingBackendChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTempGPUBackend, gr->T("Backend"), renderingBackend, GPU_BACKEND_OPENGL, ARRAY_SIZE(renderingBackend), gr, screenManager()));
|
||||
renderingBackendChoice->OnChoice.Handle(this, &GameSettingsScreen::OnRenderingBackend);
|
||||
#endif
|
||||
static const char *renderingMode[] = { "Non-Buffered Rendering", "Buffered Rendering", "Read Framebuffers To Memory (CPU)", "Read Framebuffers To Memory (GPU)"};
|
||||
PopupMultiChoice *renderingModeChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iRenderingMode, gs->T("Mode"), renderingMode, 0, ARRAY_SIZE(renderingMode), gs, screenManager()));
|
||||
PopupMultiChoice *renderingModeChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iRenderingMode, gr->T("Mode"), renderingMode, 0, ARRAY_SIZE(renderingMode), gr, screenManager()));
|
||||
renderingModeChoice->OnChoice.Handle(this, &GameSettingsScreen::OnRenderingMode);
|
||||
renderingModeChoice->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
CheckBox *blockTransfer = graphicsSettings->Add(new CheckBox(&g_Config.bBlockTransferGPU, gs->T("Simulate Block Transfer", "Simulate Block Transfer (unfinished)")));
|
||||
CheckBox *blockTransfer = graphicsSettings->Add(new CheckBox(&g_Config.bBlockTransferGPU, gr->T("Simulate Block Transfer", "Simulate Block Transfer (unfinished)")));
|
||||
blockTransfer->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
graphicsSettings->Add(new ItemHeader(gs->T("Frame Rate Control")));
|
||||
graphicsSettings->Add(new ItemHeader(gr->T("Frame Rate Control")));
|
||||
static const char *frameSkip[] = {"Off", "1", "2", "3", "4", "5", "6", "7", "8"};
|
||||
graphicsSettings->Add(new PopupMultiChoice(&g_Config.iFrameSkip, gs->T("Frame Skipping"), frameSkip, 0, ARRAY_SIZE(frameSkip), gs, screenManager()));
|
||||
frameSkipAuto_ = graphicsSettings->Add(new CheckBox(&g_Config.bAutoFrameSkip, gs->T("Auto FrameSkip")));
|
||||
graphicsSettings->Add(new PopupMultiChoice(&g_Config.iFrameSkip, gr->T("Frame Skipping"), frameSkip, 0, ARRAY_SIZE(frameSkip), gr, screenManager()));
|
||||
frameSkipAuto_ = graphicsSettings->Add(new CheckBox(&g_Config.bAutoFrameSkip, gr->T("Auto FrameSkip")));
|
||||
frameSkipAuto_->OnClick.Handle(this, &GameSettingsScreen::OnAutoFrameskip);
|
||||
graphicsSettings->Add(new CheckBox(&cap60FPS_, gs->T("Force max 60 FPS (helps GoW)")));
|
||||
graphicsSettings->Add(new CheckBox(&cap60FPS_, gr->T("Force max 60 FPS (helps GoW)")));
|
||||
|
||||
graphicsSettings->Add(new PopupSliderChoice(&iAlternateSpeedPercent_, 0, 600, gs->T("Alternative Speed", "Alternative Speed (in %, 0 = unlimited)"), 5, screenManager()));
|
||||
graphicsSettings->Add(new PopupSliderChoice(&iAlternateSpeedPercent_, 0, 600, gr->T("Alternative Speed", "Alternative Speed (in %, 0 = unlimited)"), 5, screenManager()));
|
||||
|
||||
graphicsSettings->Add(new ItemHeader(gs->T("Features")));
|
||||
graphicsSettings->Add(new ItemHeader(gr->T("Features")));
|
||||
I18NCategory *ps = GetI18NCategory("PostShaders");
|
||||
postProcChoice_ = graphicsSettings->Add(new ChoiceWithValueDisplay(&g_Config.sPostShaderName, gs->T("Postprocessing Shader"), ps));
|
||||
postProcChoice_ = graphicsSettings->Add(new ChoiceWithValueDisplay(&g_Config.sPostShaderName, gr->T("Postprocessing Shader"), ps));
|
||||
postProcChoice_->OnClick.Handle(this, &GameSettingsScreen::OnPostProcShader);
|
||||
postProcEnable_ = !g_Config.bSoftwareRendering && (g_Config.iRenderingMode != FB_NON_BUFFERED_MODE);
|
||||
postProcChoice_->SetEnabledPtr(&postProcEnable_);
|
||||
|
||||
#if !defined(MOBILE_DEVICE)
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bFullScreen, gs->T("FullScreen")))->OnClick.Handle(this, &GameSettingsScreen::OnFullscreenChange);
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bFullScreen, gr->T("FullScreen")))->OnClick.Handle(this, &GameSettingsScreen::OnFullscreenChange);
|
||||
#endif
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bStretchToDisplay, gs->T("Stretch to Display")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bStretchToDisplay, gr->T("Stretch to Display")));
|
||||
// Small Display: To avoid overlapping touch controls on large tablets. Better control over this will be coming later.
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bSmallDisplay, gs->T("Small Display")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bSmallDisplay, gr->T("Small Display")));
|
||||
if (pixel_xres < pixel_yres * 1.3) // Smaller than 4:3
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bPartialStretch, gs->T("Partial Vertical Stretch")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bPartialStretch, gr->T("Partial Vertical Stretch")));
|
||||
|
||||
#ifdef ANDROID
|
||||
// Hide Immersive Mode on pre-kitkat Android
|
||||
if (System_GetPropertyInt(SYSPROP_SYSTEMVERSION) >= 19) {
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bImmersiveMode, gs->T("Immersive Mode")))->OnClick.Handle(this, &GameSettingsScreen::OnImmersiveModeChange);
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bImmersiveMode, gr->T("Immersive Mode")))->OnClick.Handle(this, &GameSettingsScreen::OnImmersiveModeChange);
|
||||
}
|
||||
#endif
|
||||
|
||||
graphicsSettings->Add(new ItemHeader(gs->T("Performance")));
|
||||
graphicsSettings->Add(new ItemHeader(gr->T("Performance")));
|
||||
#ifndef MOBILE_DEVICE
|
||||
static const char *internalResolutions[] = {"Auto (1:1)", "1x PSP", "2x PSP", "3x PSP", "4x PSP", "5x PSP", "6x PSP", "7x PSP", "8x PSP", "9x PSP", "10x PSP" };
|
||||
#else
|
||||
static const char *internalResolutions[] = {"Auto (1:1)", "1x PSP", "2x PSP", "3x PSP", "4x PSP", "5x PSP" };
|
||||
#endif
|
||||
resolutionChoice_ = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iInternalResolution, gs->T("Rendering Resolution"), internalResolutions, 0, ARRAY_SIZE(internalResolutions), gs, screenManager()));
|
||||
resolutionChoice_ = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iInternalResolution, gr->T("Rendering Resolution"), internalResolutions, 0, ARRAY_SIZE(internalResolutions), gr, screenManager()));
|
||||
resolutionChoice_->OnChoice.Handle(this, &GameSettingsScreen::OnResolutionChange);
|
||||
resolutionEnable_ = !g_Config.bSoftwareRendering && (g_Config.iRenderingMode != FB_NON_BUFFERED_MODE);
|
||||
resolutionChoice_->SetEnabledPtr(&resolutionEnable_);
|
||||
|
||||
static const char *displayRotation[] = {"Landscape", "Portrait", "Landscape Reversed", "Portrait Reversed"};
|
||||
PopupMultiChoice *dispRotChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iInternalScreenRotation, gs->T("Display Rotation"), displayRotation, 1, ARRAY_SIZE(displayRotation), c, screenManager()));
|
||||
PopupMultiChoice *dispRotChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iInternalScreenRotation, gr->T("Display Rotation"), displayRotation, 1, ARRAY_SIZE(displayRotation), co, screenManager()));
|
||||
dispRotChoice->SetEnabledPtr(&displayRotEnable_);
|
||||
displayRotEnable_ = (g_Config.iRenderingMode != FB_NON_BUFFERED_MODE);
|
||||
|
||||
@ -193,50 +193,50 @@ void GameSettingsScreen::CreateViews() {
|
||||
static const char *deviceResolutions[] = { "Native device resolution", "Auto (same as Rendering)", "1x PSP", "2x PSP", "3x PSP", "4x PSP", "5x PSP" };
|
||||
int max_res_temp = std::max(System_GetPropertyInt(SYSPROP_DISPLAY_XRES), System_GetPropertyInt(SYSPROP_DISPLAY_YRES)) / 480 + 2;
|
||||
int max_res = std::min(max_res_temp, (int)ARRAY_SIZE(deviceResolutions));
|
||||
UI::PopupMultiChoice *hwscale = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iAndroidHwScale, gs->T("Display Resolution (HW scaler)"), deviceResolutions, 0, max_res, gs, screenManager()));
|
||||
UI::PopupMultiChoice *hwscale = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iAndroidHwScale, gr->T("Display Resolution (HW scaler)"), deviceResolutions, 0, max_res, gr, screenManager()));
|
||||
hwscale->OnChoice.Handle(this, &GameSettingsScreen::OnHwScaleChange); // To refresh the display mode
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bVSync, gs->T("VSync")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bVSync, gr->T("VSync")));
|
||||
#endif
|
||||
CheckBox *mipmapping = graphicsSettings->Add(new CheckBox(&g_Config.bMipMap, gs->T("Mipmapping")));
|
||||
CheckBox *mipmapping = graphicsSettings->Add(new CheckBox(&g_Config.bMipMap, gr->T("Mipmapping")));
|
||||
mipmapping->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
CheckBox *hwTransform = graphicsSettings->Add(new CheckBox(&g_Config.bHardwareTransform, gs->T("Hardware Transform")));
|
||||
CheckBox *hwTransform = graphicsSettings->Add(new CheckBox(&g_Config.bHardwareTransform, gr->T("Hardware Transform")));
|
||||
hwTransform->OnClick.Handle(this, &GameSettingsScreen::OnHardwareTransform);
|
||||
hwTransform->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
CheckBox *swSkin = graphicsSettings->Add(new CheckBox(&g_Config.bSoftwareSkinning, gs->T("Software Skinning")));
|
||||
CheckBox *swSkin = graphicsSettings->Add(new CheckBox(&g_Config.bSoftwareSkinning, gr->T("Software Skinning")));
|
||||
swSkin->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
CheckBox *vtxCache = graphicsSettings->Add(new CheckBox(&g_Config.bVertexCache, gs->T("Vertex Cache")));
|
||||
CheckBox *vtxCache = graphicsSettings->Add(new CheckBox(&g_Config.bVertexCache, gr->T("Vertex Cache")));
|
||||
vtxCacheEnable_ = !g_Config.bSoftwareRendering && g_Config.bHardwareTransform;
|
||||
vtxCache->SetEnabledPtr(&vtxCacheEnable_);
|
||||
|
||||
CheckBox *texBackoff = graphicsSettings->Add(new CheckBox(&g_Config.bTextureBackoffCache, gs->T("Lazy texture caching", "Lazy texture caching (speedup)")));
|
||||
CheckBox *texBackoff = graphicsSettings->Add(new CheckBox(&g_Config.bTextureBackoffCache, gr->T("Lazy texture caching", "Lazy texture caching (speedup)")));
|
||||
texBackoff->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
CheckBox *texSecondary_ = graphicsSettings->Add(new CheckBox(&g_Config.bTextureSecondaryCache, gs->T("Retain changed textures", "Retain changed textures (speedup, mem hog)")));
|
||||
CheckBox *texSecondary_ = graphicsSettings->Add(new CheckBox(&g_Config.bTextureSecondaryCache, gr->T("Retain changed textures", "Retain changed textures (speedup, mem hog)")));
|
||||
texSecondary_->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
CheckBox *framebufferSlowEffects = graphicsSettings->Add(new CheckBox(&g_Config.bDisableSlowFramebufEffects, gs->T("Disable slower effects (speedup)")));
|
||||
CheckBox *framebufferSlowEffects = graphicsSettings->Add(new CheckBox(&g_Config.bDisableSlowFramebufEffects, gr->T("Disable slower effects (speedup)")));
|
||||
framebufferSlowEffects->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
// Seems solid, so we hide the setting.
|
||||
// CheckBox *vtxJit = graphicsSettings->Add(new CheckBox(&g_Config.bVertexDecoderJit, gs->T("Vertex Decoder JIT")));
|
||||
// CheckBox *vtxJit = graphicsSettings->Add(new CheckBox(&g_Config.bVertexDecoderJit, gr->T("Vertex Decoder JIT")));
|
||||
|
||||
// if (PSP_IsInited()) {
|
||||
// vtxJit->SetEnabled(false);
|
||||
// }
|
||||
|
||||
static const char *quality[] = { "Low", "Medium", "High"};
|
||||
PopupMultiChoice *beziersChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iSplineBezierQuality, gs->T("LowCurves", "Spline/Bezier curves quality"), quality, 0, ARRAY_SIZE(quality), gs, screenManager()));
|
||||
PopupMultiChoice *beziersChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iSplineBezierQuality, gr->T("LowCurves", "Spline/Bezier curves quality"), quality, 0, ARRAY_SIZE(quality), gr, screenManager()));
|
||||
beziersChoice->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
// In case we're going to add few other antialiasing option like MSAA in the future.
|
||||
// graphicsSettings->Add(new CheckBox(&g_Config.bFXAA, gs->T("FXAA")));
|
||||
graphicsSettings->Add(new ItemHeader(gs->T("Texture Scaling")));
|
||||
// graphicsSettings->Add(new CheckBox(&g_Config.bFXAA, gr->T("FXAA")));
|
||||
graphicsSettings->Add(new ItemHeader(gr->T("Texture Scaling")));
|
||||
#ifndef MOBILE_DEVICE
|
||||
static const char *texScaleLevelsNPOT[] = {"Auto", "Off", "2x", "3x", "4x", "5x"};
|
||||
static const char *texScaleLevelsPOT[] = {"Auto", "Off", "2x", "4x"};
|
||||
@ -254,83 +254,83 @@ void GameSettingsScreen::CreateViews() {
|
||||
texScaleLevels = texScaleLevelsPOT;
|
||||
numTexScaleLevels = ARRAY_SIZE(texScaleLevelsPOT);
|
||||
}
|
||||
PopupMultiChoice *texScalingChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexScalingLevel, gs->T("Upscale Level"), texScaleLevels, 0, numTexScaleLevels, gs, screenManager()));
|
||||
PopupMultiChoice *texScalingChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexScalingLevel, gr->T("Upscale Level"), texScaleLevels, 0, numTexScaleLevels, gr, screenManager()));
|
||||
texScalingChoice->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
static const char *texScaleAlgos[] = { "xBRZ", "Hybrid", "Bicubic", "Hybrid + Bicubic", };
|
||||
PopupMultiChoice *texScalingType = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexScalingType, gs->T("Upscale Type"), texScaleAlgos, 0, ARRAY_SIZE(texScaleAlgos), gs, screenManager()));
|
||||
PopupMultiChoice *texScalingType = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexScalingType, gr->T("Upscale Type"), texScaleAlgos, 0, ARRAY_SIZE(texScaleAlgos), gr, screenManager()));
|
||||
texScalingType->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
CheckBox *deposterize = graphicsSettings->Add(new CheckBox(&g_Config.bTexDeposterize, gs->T("Deposterize")));
|
||||
CheckBox *deposterize = graphicsSettings->Add(new CheckBox(&g_Config.bTexDeposterize, gr->T("Deposterize")));
|
||||
deposterize->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
graphicsSettings->Add(new ItemHeader(gs->T("Texture Filtering")));
|
||||
graphicsSettings->Add(new ItemHeader(gr->T("Texture Filtering")));
|
||||
static const char *anisoLevels[] = { "Off", "2x", "4x", "8x", "16x" };
|
||||
PopupMultiChoice *anisoFiltering = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iAnisotropyLevel, gs->T("Anisotropic Filtering"), anisoLevels, 0, ARRAY_SIZE(anisoLevels), gs, screenManager()));
|
||||
PopupMultiChoice *anisoFiltering = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iAnisotropyLevel, gr->T("Anisotropic Filtering"), anisoLevels, 0, ARRAY_SIZE(anisoLevels), gr, screenManager()));
|
||||
anisoFiltering->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
static const char *texFilters[] = { "Auto", "Nearest", "Linear", "Linear on FMV", };
|
||||
PopupMultiChoice *texFilter = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexFiltering, gs->T("Texture Filter"), texFilters, 1, ARRAY_SIZE(texFilters), gs, screenManager()));
|
||||
PopupMultiChoice *texFilter = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexFiltering, gr->T("Texture Filter"), texFilters, 1, ARRAY_SIZE(texFilters), gr, screenManager()));
|
||||
texFilter->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
static const char *bufFilters[] = { "Linear", "Nearest", };
|
||||
PopupMultiChoice *bufFilter = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iBufFilter, gs->T("Screen Scaling Filter"), bufFilters, 1, ARRAY_SIZE(bufFilters), gs, screenManager()));
|
||||
PopupMultiChoice *bufFilter = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iBufFilter, gr->T("Screen Scaling Filter"), bufFilters, 1, ARRAY_SIZE(bufFilters), gr, screenManager()));
|
||||
bufFilter->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
#ifdef ANDROID
|
||||
graphicsSettings->Add(new ItemHeader(gs->T("Cardboard Settings", "Cardboard Settings")));
|
||||
CheckBox *cardboardMode = graphicsSettings->Add(new CheckBox(&g_Config.bEnableCardboard, gs->T("Enable Cardboard", "Enable Cardboard")));
|
||||
graphicsSettings->Add(new ItemHeader(gr->T("Cardboard Settings", "Cardboard Settings")));
|
||||
CheckBox *cardboardMode = graphicsSettings->Add(new CheckBox(&g_Config.bEnableCardboard, gr->T("Enable Cardboard", "Enable Cardboard")));
|
||||
cardboardMode->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
PopupSliderChoice * cardboardScreenSize = graphicsSettings->Add(new PopupSliderChoice(&g_Config.iCardboardScreenSize, 30, 100, gs->T("Cardboard Screen Size", "Screen Size (in % of the viewport)"), 1, screenManager()));
|
||||
PopupSliderChoice * cardboardScreenSize = graphicsSettings->Add(new PopupSliderChoice(&g_Config.iCardboardScreenSize, 30, 100, gr->T("Cardboard Screen Size", "Screen Size (in % of the viewport)"), 1, screenManager()));
|
||||
cardboardScreenSize->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
PopupSliderChoice *cardboardXShift = graphicsSettings->Add(new PopupSliderChoice(&g_Config.iCardboardXShift, -100, 100, gs->T("Cardboard Screen X Shift", "X Shift (in % of the void)"), 1, screenManager()));
|
||||
PopupSliderChoice *cardboardXShift = graphicsSettings->Add(new PopupSliderChoice(&g_Config.iCardboardXShift, -100, 100, gr->T("Cardboard Screen X Shift", "X Shift (in % of the void)"), 1, screenManager()));
|
||||
cardboardXShift->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
PopupSliderChoice *cardboardYShift = graphicsSettings->Add(new PopupSliderChoice(&g_Config.iCardboardYShift, -100, 100, gs->T("Cardboard Screen Y Shift", "Y Shift (in % of the void)"), 1, screenManager()));
|
||||
PopupSliderChoice *cardboardYShift = graphicsSettings->Add(new PopupSliderChoice(&g_Config.iCardboardYShift, -100, 100, gr->T("Cardboard Screen Y Shift", "Y Shift (in % of the void)"), 1, screenManager()));
|
||||
cardboardYShift->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
#endif
|
||||
|
||||
graphicsSettings->Add(new ItemHeader(gs->T("Hack Settings", "Hack Settings (these WILL cause glitches)")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bTimerHack, gs->T("Timer Hack")));
|
||||
CheckBox *alphaHack = graphicsSettings->Add(new CheckBox(&g_Config.bDisableAlphaTest, gs->T("Disable Alpha Test (PowerVR speedup)")));
|
||||
graphicsSettings->Add(new ItemHeader(gr->T("Hack Settings", "Hack Settings (these WILL cause glitches)")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bTimerHack, gr->T("Timer Hack")));
|
||||
CheckBox *alphaHack = graphicsSettings->Add(new CheckBox(&g_Config.bDisableAlphaTest, gr->T("Disable Alpha Test (PowerVR speedup)")));
|
||||
alphaHack->OnClick.Handle(this, &GameSettingsScreen::OnShaderChange);
|
||||
alphaHack->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
CheckBox *stencilTest = graphicsSettings->Add(new CheckBox(&g_Config.bDisableStencilTest, gs->T("Disable Stencil Test")));
|
||||
CheckBox *stencilTest = graphicsSettings->Add(new CheckBox(&g_Config.bDisableStencilTest, gr->T("Disable Stencil Test")));
|
||||
stencilTest->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
CheckBox *depthWrite = graphicsSettings->Add(new CheckBox(&g_Config.bAlwaysDepthWrite, gs->T("Always Depth Write")));
|
||||
CheckBox *depthWrite = graphicsSettings->Add(new CheckBox(&g_Config.bAlwaysDepthWrite, gr->T("Always Depth Write")));
|
||||
depthWrite->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
CheckBox *prescale = graphicsSettings->Add(new CheckBox(&g_Config.bPrescaleUV, gs->T("Texture Coord Speedhack")));
|
||||
CheckBox *prescale = graphicsSettings->Add(new CheckBox(&g_Config.bPrescaleUV, gr->T("Texture Coord Speedhack")));
|
||||
prescale->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
CheckBox *depthRange = graphicsSettings->Add(new CheckBox(&g_Config.bDepthRangeHack, gs->T("Depth Range Hack (Phantasy Star Portable 2)")));
|
||||
CheckBox *depthRange = graphicsSettings->Add(new CheckBox(&g_Config.bDepthRangeHack, gr->T("Depth Range Hack (Phantasy Star Portable 2)")));
|
||||
depthRange->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
static const char *bloomHackOptions[] = { "Off", "Safe", "Balanced", "Aggressive" };
|
||||
PopupMultiChoice *bloomHack = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iBloomHack, gs->T("Lower resolution for effects (reduces artifacts)"), bloomHackOptions, 0, ARRAY_SIZE(bloomHackOptions), gs, screenManager()));
|
||||
PopupMultiChoice *bloomHack = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iBloomHack, gr->T("Lower resolution for effects (reduces artifacts)"), bloomHackOptions, 0, ARRAY_SIZE(bloomHackOptions), gr, screenManager()));
|
||||
bloomHackEnable_ = !g_Config.bSoftwareRendering && (g_Config.iInternalResolution != 1);
|
||||
bloomHack->SetEnabledPtr(&bloomHackEnable_);
|
||||
|
||||
graphicsSettings->Add(new ItemHeader(gs->T("Overlay Information")));
|
||||
graphicsSettings->Add(new ItemHeader(gr->T("Overlay Information")));
|
||||
static const char *fpsChoices[] = {
|
||||
"None", "Speed", "FPS", "Both"
|
||||
#ifdef BLACKBERRY
|
||||
, "Statistics"
|
||||
#endif
|
||||
};
|
||||
graphicsSettings->Add(new PopupMultiChoice(&g_Config.iShowFPSCounter, gs->T("Show FPS Counter"), fpsChoices, 0, ARRAY_SIZE(fpsChoices), gs, screenManager()));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bShowDebugStats, gs->T("Show Debug Statistics")))->OnClick.Handle(this, &GameSettingsScreen::OnJitAffectingSetting);
|
||||
graphicsSettings->Add(new PopupMultiChoice(&g_Config.iShowFPSCounter, gr->T("Show FPS Counter"), fpsChoices, 0, ARRAY_SIZE(fpsChoices), gr, screenManager()));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bShowDebugStats, gr->T("Show Debug Statistics")))->OnClick.Handle(this, &GameSettingsScreen::OnJitAffectingSetting);
|
||||
|
||||
// Developer tools are not accessible ingame, so it goes here.
|
||||
graphicsSettings->Add(new ItemHeader(gs->T("Debugging")));
|
||||
Choice *dump = graphicsSettings->Add(new Choice(gs->T("Dump next frame to log")));
|
||||
graphicsSettings->Add(new ItemHeader(gr->T("Debugging")));
|
||||
Choice *dump = graphicsSettings->Add(new Choice(gr->T("Dump next frame to log")));
|
||||
dump->OnClick.Handle(this, &GameSettingsScreen::OnDumpNextFrameToLog);
|
||||
if (!PSP_IsInited())
|
||||
dump->SetEnabled(false);
|
||||
|
||||
// We normally use software rendering to debug so put it in debugging.
|
||||
CheckBox *softwareGPU = graphicsSettings->Add(new CheckBox(&g_Config.bSoftwareRendering, gs->T("Software Rendering", "Software Rendering (experimental)")));
|
||||
CheckBox *softwareGPU = graphicsSettings->Add(new CheckBox(&g_Config.bSoftwareRendering, gr->T("Software Rendering", "Software Rendering (experimental)")));
|
||||
softwareGPU->OnClick.Handle(this, &GameSettingsScreen::OnSoftwareRendering);
|
||||
|
||||
if (PSP_IsInited() || g_Config.iGPUBackend != GPU_BACKEND_OPENGL)
|
||||
@ -356,7 +356,7 @@ void GameSettingsScreen::CreateViews() {
|
||||
#endif
|
||||
|
||||
static const char *latency[] = { "Low", "Medium", "High" };
|
||||
PopupMultiChoice *lowAudio = audioSettings->Add(new PopupMultiChoice(&g_Config.iAudioLatency, a->T("Audio Latency"), latency, 0, ARRAY_SIZE(latency), gs, screenManager()));
|
||||
PopupMultiChoice *lowAudio = audioSettings->Add(new PopupMultiChoice(&g_Config.iAudioLatency, a->T("Audio Latency"), latency, 0, ARRAY_SIZE(latency), gr, screenManager()));
|
||||
|
||||
lowAudio->SetEnabledPtr(&g_Config.bEnableSound);
|
||||
if (System_GetPropertyInt(SYSPROP_AUDIO_SAMPLE_RATE) == 44100) {
|
||||
@ -374,38 +374,38 @@ void GameSettingsScreen::CreateViews() {
|
||||
controlsSettingsScroll->Add(controlsSettings);
|
||||
tabHolder->AddTab(ms->T("Controls"), controlsSettingsScroll);
|
||||
controlsSettings->Add(new ItemHeader(ms->T("Controls")));
|
||||
controlsSettings->Add(new Choice(c->T("Control Mapping")))->OnClick.Handle(this, &GameSettingsScreen::OnControlMapping);
|
||||
controlsSettings->Add(new Choice(co->T("Control Mapping")))->OnClick.Handle(this, &GameSettingsScreen::OnControlMapping);
|
||||
|
||||
#if defined(USING_WIN_UI)
|
||||
controlsSettings->Add(new CheckBox(&g_Config.bGamepadOnlyFocused, c->T("Ignore gamepads when not focused")));
|
||||
controlsSettings->Add(new CheckBox(&g_Config.bGamepadOnlyFocused, co->T("Ignore gamepads when not focused")));
|
||||
#endif
|
||||
|
||||
#if defined(MOBILE_DEVICE)
|
||||
controlsSettings->Add(new CheckBox(&g_Config.bHapticFeedback, c->T("HapticFeedback", "Haptic Feedback (vibration)")));
|
||||
controlsSettings->Add(new CheckBox(&g_Config.bHapticFeedback, co->T("HapticFeedback", "Haptic Feedback (vibration)")));
|
||||
static const char *tiltTypes[] = { "None (Disabled)", "Analog Stick", "D-PAD", "PSP Action Buttons"};
|
||||
controlsSettings->Add(new PopupMultiChoice(&g_Config.iTiltInputType, c->T("Tilt Input Type"), tiltTypes, 0, ARRAY_SIZE(tiltTypes), c, screenManager()))->OnClick.Handle(this, &GameSettingsScreen::OnTiltTypeChange);
|
||||
controlsSettings->Add(new PopupMultiChoice(&g_Config.iTiltInputType, co->T("Tilt Input Type"), tiltTypes, 0, ARRAY_SIZE(tiltTypes), co, screenManager()))->OnClick.Handle(this, &GameSettingsScreen::OnTiltTypeChange);
|
||||
|
||||
Choice *customizeTilt = controlsSettings->Add(new Choice(c->T("Customize tilt")));
|
||||
Choice *customizeTilt = controlsSettings->Add(new Choice(co->T("Customize tilt")));
|
||||
customizeTilt->OnClick.Handle(this, &GameSettingsScreen::OnTiltCustomize);
|
||||
customizeTilt->SetEnabledPtr((bool *)&g_Config.iTiltInputType); //<- dirty int-to-bool cast
|
||||
#endif
|
||||
|
||||
// TVs don't have touch control, at least not yet.
|
||||
if (System_GetPropertyInt(SYSPROP_DEVICE_TYPE) != DEVICE_TYPE_TV) {
|
||||
controlsSettings->Add(new ItemHeader(c->T("OnScreen", "On-Screen Touch Controls")));
|
||||
controlsSettings->Add(new CheckBox(&g_Config.bShowTouchControls, c->T("OnScreen", "On-Screen Touch Controls")));
|
||||
layoutEditorChoice_ = controlsSettings->Add(new Choice(c->T("Custom layout...")));
|
||||
controlsSettings->Add(new ItemHeader(co->T("OnScreen", "On-Screen Touch Controls")));
|
||||
controlsSettings->Add(new CheckBox(&g_Config.bShowTouchControls, co->T("OnScreen", "On-Screen Touch Controls")));
|
||||
layoutEditorChoice_ = controlsSettings->Add(new Choice(co->T("Custom layout...")));
|
||||
layoutEditorChoice_->OnClick.Handle(this, &GameSettingsScreen::OnTouchControlLayout);
|
||||
layoutEditorChoice_->SetEnabledPtr(&g_Config.bShowTouchControls);
|
||||
|
||||
// Re-centers itself to the touch location on touch-down.
|
||||
CheckBox *floatingAnalog = controlsSettings->Add(new CheckBox(&g_Config.bAutoCenterTouchAnalog, c->T("Auto-centering analog stick")));
|
||||
CheckBox *floatingAnalog = controlsSettings->Add(new CheckBox(&g_Config.bAutoCenterTouchAnalog, co->T("Auto-centering analog stick")));
|
||||
floatingAnalog->SetEnabledPtr(&g_Config.bShowTouchControls);
|
||||
|
||||
// On systems that aren't Symbian, iOS, and Maemo, offer to let the user see this button.
|
||||
// Some Windows touch devices don't have a back button or other button to call up the menu.
|
||||
#if !defined(__SYMBIAN32__) && !defined(IOS) && !defined(MAEMO)
|
||||
CheckBox *enablePauseBtn = controlsSettings->Add(new CheckBox(&g_Config.bShowTouchPause, c->T("Show Touch Pause Menu Button")));
|
||||
CheckBox *enablePauseBtn = controlsSettings->Add(new CheckBox(&g_Config.bShowTouchPause, co->T("Show Touch Pause Menu Button")));
|
||||
|
||||
// Don't allow the user to disable it once in-game, so they can't lock themselves out of the menu.
|
||||
if (!PSP_IsInited()) {
|
||||
@ -415,36 +415,36 @@ void GameSettingsScreen::CreateViews() {
|
||||
}
|
||||
#endif
|
||||
|
||||
CheckBox *disableDiags = controlsSettings->Add(new CheckBox(&g_Config.bDisableDpadDiagonals, c->T("Disable D-Pad diagonals (4-way touch)")));
|
||||
CheckBox *disableDiags = controlsSettings->Add(new CheckBox(&g_Config.bDisableDpadDiagonals, co->T("Disable D-Pad diagonals (4-way touch)")));
|
||||
disableDiags->SetEnabledPtr(&g_Config.bShowTouchControls);
|
||||
View *opacity = controlsSettings->Add(new PopupSliderChoice(&g_Config.iTouchButtonOpacity, 0, 100, c->T("Button Opacity"), screenManager()));
|
||||
View *opacity = controlsSettings->Add(new PopupSliderChoice(&g_Config.iTouchButtonOpacity, 0, 100, co->T("Button Opacity"), screenManager()));
|
||||
opacity->SetEnabledPtr(&g_Config.bShowTouchControls);
|
||||
static const char *touchControlStyles[] = {"Classic", "Thin borders"};
|
||||
View *style = controlsSettings->Add(new PopupMultiChoice(&g_Config.iTouchButtonStyle, c->T("Button style"), touchControlStyles, 0, ARRAY_SIZE(touchControlStyles), c, screenManager()));
|
||||
View *style = controlsSettings->Add(new PopupMultiChoice(&g_Config.iTouchButtonStyle, co->T("Button style"), touchControlStyles, 0, ARRAY_SIZE(touchControlStyles), co, screenManager()));
|
||||
style->SetEnabledPtr(&g_Config.bShowTouchControls);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
static const char *inverseDeadzoneModes[] = { "Off", "X", "Y", "X + Y" };
|
||||
|
||||
controlsSettings->Add(new ItemHeader(c->T("DInput Analog Settings", "DInput Analog Settings")));
|
||||
controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fDInputAnalogDeadzone, 0.0f, 1.0f, c->T("Deadzone Radius"), screenManager()));
|
||||
controlsSettings->Add(new PopupMultiChoice(&g_Config.iDInputAnalogInverseMode, c->T("Analog Mapper Mode"), inverseDeadzoneModes, 0, ARRAY_SIZE(inverseDeadzoneModes), c, screenManager()));
|
||||
controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fDInputAnalogInverseDeadzone, 0.0f, 1.0f, c->T("Analog Mapper Low End", "Analog Mapper Low End (Inverse Deadzone)"), screenManager()));
|
||||
controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fDInputAnalogSensitivity, 0.0f, 10.0f, c->T("Analog Mapper High End", "Analog Mapper High End (Axis Sensitivity)"), screenManager()));
|
||||
controlsSettings->Add(new ItemHeader(co->T("DInput Analog Settings", "DInput Analog Settings")));
|
||||
controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fDInputAnalogDeadzone, 0.0f, 1.0f, co->T("Deadzone Radius"), screenManager()));
|
||||
controlsSettings->Add(new PopupMultiChoice(&g_Config.iDInputAnalogInverseMode, co->T("Analog Mapper Mode"), inverseDeadzoneModes, 0, ARRAY_SIZE(inverseDeadzoneModes), co, screenManager()));
|
||||
controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fDInputAnalogInverseDeadzone, 0.0f, 1.0f, co->T("Analog Mapper Low End", "Analog Mapper Low End (Inverse Deadzone)"), screenManager()));
|
||||
controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fDInputAnalogSensitivity, 0.0f, 10.0f, co->T("Analog Mapper High End", "Analog Mapper High End (Axis Sensitivity)"), screenManager()));
|
||||
|
||||
controlsSettings->Add(new ItemHeader(c->T("XInput Analog Settings", "XInput Analog Settings")));
|
||||
controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fXInputAnalogDeadzone, 0.0f, 1.0f, c->T("Deadzone Radius"), screenManager()));
|
||||
controlsSettings->Add(new PopupMultiChoice(&g_Config.iXInputAnalogInverseMode, c->T("Analog Mapper Mode"), inverseDeadzoneModes, 0, ARRAY_SIZE(inverseDeadzoneModes), c, screenManager()));
|
||||
controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fXInputAnalogInverseDeadzone, 0.0f, 1.0f, c->T("Analog Mapper Low End", "Analog Mapper Low End (Inverse Deadzone)"), screenManager()));
|
||||
controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fXInputAnalogSensitivity, 0.0f, 10.0f, c->T("Analog Mapper High End", "Analog Mapper High End (Axis Sensitivity)"), screenManager()));
|
||||
controlsSettings->Add(new ItemHeader(co->T("XInput Analog Settings", "XInput Analog Settings")));
|
||||
controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fXInputAnalogDeadzone, 0.0f, 1.0f, co->T("Deadzone Radius"), screenManager()));
|
||||
controlsSettings->Add(new PopupMultiChoice(&g_Config.iXInputAnalogInverseMode, co->T("Analog Mapper Mode"), inverseDeadzoneModes, 0, ARRAY_SIZE(inverseDeadzoneModes), co, screenManager()));
|
||||
controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fXInputAnalogInverseDeadzone, 0.0f, 1.0f, co->T("Analog Mapper Low End", "Analog Mapper Low End (Inverse Deadzone)"), screenManager()));
|
||||
controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fXInputAnalogSensitivity, 0.0f, 10.0f, co->T("Analog Mapper High End", "Analog Mapper High End (Axis Sensitivity)"), screenManager()));
|
||||
#endif
|
||||
|
||||
controlsSettings->Add(new ItemHeader(c->T("Keyboard", "Keyboard Control Settings")));
|
||||
controlsSettings->Add(new ItemHeader(co->T("Keyboard", "Keyboard Control Settings")));
|
||||
#if defined(USING_WIN_UI)
|
||||
controlsSettings->Add(new CheckBox(&g_Config.bIgnoreWindowsKey, c->T("Ignore Windows Key")));
|
||||
controlsSettings->Add(new CheckBox(&g_Config.bIgnoreWindowsKey, co->T("Ignore Windows Key")));
|
||||
#endif // #if defined(USING_WIN_UI)
|
||||
controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fAnalogLimiterDeadzone, 0.0f, 1.0f, c->T("Analog Limiter"), 0.10f, screenManager()));
|
||||
controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fAnalogLimiterDeadzone, 0.0f, 1.0f, co->T("Analog Limiter"), 0.10f, screenManager()));
|
||||
|
||||
ViewGroup *networkingSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
LinearLayout *networkingSettings = new LinearLayout(ORIENT_VERTICAL);
|
||||
@ -483,57 +483,57 @@ void GameSettingsScreen::CreateViews() {
|
||||
systemSettingsScroll->Add(systemSettings);
|
||||
tabHolder->AddTab(ms->T("System"), systemSettingsScroll);
|
||||
|
||||
systemSettings->Add(new ItemHeader(s->T("UI Language")));
|
||||
systemSettings->Add(new ItemHeader(sy->T("UI Language")));
|
||||
systemSettings->Add(new Choice(dev->T("Language", "Language")))->OnClick.Handle(this, &GameSettingsScreen::OnLanguage);
|
||||
|
||||
systemSettings->Add(new ItemHeader(s->T("Developer Tools")));
|
||||
systemSettings->Add(new Choice(s->T("Developer Tools")))->OnClick.Handle(this, &GameSettingsScreen::OnDeveloperTools);
|
||||
systemSettings->Add(new ItemHeader(sy->T("Developer Tools")));
|
||||
systemSettings->Add(new Choice(sy->T("Developer Tools")))->OnClick.Handle(this, &GameSettingsScreen::OnDeveloperTools);
|
||||
|
||||
systemSettings->Add(new ItemHeader(s->T("Help the PPSSPP team")));
|
||||
systemSettings->Add(new ItemHeader(sy->T("Help the PPSSPP team")));
|
||||
enableReports_ = Reporting::IsEnabled();
|
||||
enableReportsCheckbox_ = new CheckBox(&enableReports_, s->T("Enable Compatibility Server Reports"));
|
||||
enableReportsCheckbox_ = new CheckBox(&enableReports_, sy->T("Enable Compatibility Server Reports"));
|
||||
enableReportsCheckbox_->SetEnabled(Reporting::IsSupported());
|
||||
systemSettings->Add(enableReportsCheckbox_);
|
||||
|
||||
systemSettings->Add(new ItemHeader(s->T("Emulation")));
|
||||
systemSettings->Add(new ItemHeader(sy->T("Emulation")));
|
||||
|
||||
systemSettings->Add(new CheckBox(&g_Config.bFastMemory, s->T("Fast Memory", "Fast Memory (Unstable)")))->OnClick.Handle(this, &GameSettingsScreen::OnJitAffectingSetting);
|
||||
systemSettings->Add(new CheckBox(&g_Config.bFastMemory, sy->T("Fast Memory", "Fast Memory (Unstable)")))->OnClick.Handle(this, &GameSettingsScreen::OnJitAffectingSetting);
|
||||
|
||||
systemSettings->Add(new CheckBox(&g_Config.bSeparateCPUThread, s->T("Multithreaded (experimental)")));
|
||||
systemSettings->Add(new CheckBox(&g_Config.bSeparateIOThread, s->T("I/O on thread (experimental)")))->SetEnabled(!PSP_IsInited());
|
||||
systemSettings->Add(new CheckBox(&g_Config.bSeparateCPUThread, sy->T("Multithreaded (experimental)")));
|
||||
systemSettings->Add(new CheckBox(&g_Config.bSeparateIOThread, sy->T("I/O on thread (experimental)")))->SetEnabled(!PSP_IsInited());
|
||||
static const char *ioTimingMethods[] = { "Fast (lag on slow storage)", "Host (bugs, less lag)", "Simulate UMD delays" };
|
||||
View *ioTimingMethod = systemSettings->Add(new PopupMultiChoice(&g_Config.iIOTimingMethod, s->T("IO timing method"), ioTimingMethods, 0, ARRAY_SIZE(ioTimingMethods), s, screenManager()));
|
||||
View *ioTimingMethod = systemSettings->Add(new PopupMultiChoice(&g_Config.iIOTimingMethod, sy->T("IO timing method"), ioTimingMethods, 0, ARRAY_SIZE(ioTimingMethods), sy, screenManager()));
|
||||
ioTimingMethod->SetEnabledPtr(&g_Config.bSeparateIOThread);
|
||||
systemSettings->Add(new CheckBox(&g_Config.bForceLagSync, s->T("Force real clock sync (slower, less lag)")));
|
||||
systemSettings->Add(new PopupSliderChoice(&g_Config.iLockedCPUSpeed, 0, 1000, s->T("Change CPU Clock", "Change CPU Clock (0 = default) (unstable)"), screenManager()));
|
||||
systemSettings->Add(new CheckBox(&g_Config.bForceLagSync, sy->T("Force real clock sync (slower, less lag)")));
|
||||
systemSettings->Add(new PopupSliderChoice(&g_Config.iLockedCPUSpeed, 0, 1000, sy->T("Change CPU Clock", "Change CPU Clock (0 = default) (unstable)"), screenManager()));
|
||||
#ifndef MOBILE_DEVICE
|
||||
systemSettings->Add(new PopupSliderChoice(&g_Config.iRewindFlipFrequency, 0, 1800, s->T("Rewind Snapshot Frequency", "Rewind Snapshot Frequency (0 = off, mem hog)"), screenManager()));
|
||||
systemSettings->Add(new PopupSliderChoice(&g_Config.iRewindFlipFrequency, 0, 1800, sy->T("Rewind Snapshot Frequency", "Rewind Snapshot Frequency (0 = off, mem hog)"), screenManager()));
|
||||
#endif
|
||||
systemSettings->Add(new CheckBox(&g_Config.bSetRoundingMode, s->T("Respect FPU rounding (disable for old GEB saves)")))->OnClick.Handle(this, &GameSettingsScreen::OnJitAffectingSetting);
|
||||
systemSettings->Add(new CheckBox(&g_Config.bSetRoundingMode, sy->T("Respect FPU rounding (disable for old GEB saves)")))->OnClick.Handle(this, &GameSettingsScreen::OnJitAffectingSetting);
|
||||
|
||||
systemSettings->Add(new ItemHeader(s->T("General")));
|
||||
systemSettings->Add(new ItemHeader(sy->T("General")));
|
||||
|
||||
#ifdef ANDROID
|
||||
if (System_GetPropertyInt(SYSPROP_DEVICE_TYPE) == DEVICE_TYPE_MOBILE) {
|
||||
static const char *screenRotation[] = {"Auto", "Landscape", "Portrait", "Landscape Reversed", "Portrait Reversed"};
|
||||
PopupMultiChoice *rot = systemSettings->Add(new PopupMultiChoice(&g_Config.iScreenRotation, c->T("Screen Rotation"), screenRotation, 0, ARRAY_SIZE(screenRotation), c, screenManager()));
|
||||
PopupMultiChoice *rot = systemSettings->Add(new PopupMultiChoice(&g_Config.iScreenRotation, co->T("Screen Rotation"), screenRotation, 0, ARRAY_SIZE(screenRotation), co, screenManager()));
|
||||
rot->OnChoice.Handle(this, &GameSettingsScreen::OnScreenRotation);
|
||||
}
|
||||
#endif
|
||||
|
||||
systemSettings->Add(new CheckBox(&g_Config.bCheckForNewVersion, s->T("VersionCheck", "Check for new versions of PPSSPP")));
|
||||
systemSettings->Add(new CheckBox(&g_Config.bCheckForNewVersion, sy->T("VersionCheck", "Check for new versions of PPSSPP")));
|
||||
if (g_Config.iMaxRecent > 0)
|
||||
systemSettings->Add(new Choice(s->T("Clear Recent Games List")))->OnClick.Handle(this, &GameSettingsScreen::OnClearRecents);
|
||||
systemSettings->Add(new Choice(s->T("Restore Default Settings")))->OnClick.Handle(this, &GameSettingsScreen::OnRestoreDefaultSettings);
|
||||
systemSettings->Add(new CheckBox(&g_Config.bEnableAutoLoad, s->T("Auto Load Newest Savestate")));
|
||||
systemSettings->Add(new Choice(sy->T("Clear Recent Games List")))->OnClick.Handle(this, &GameSettingsScreen::OnClearRecents);
|
||||
systemSettings->Add(new Choice(sy->T("Restore Default Settings")))->OnClick.Handle(this, &GameSettingsScreen::OnRestoreDefaultSettings);
|
||||
systemSettings->Add(new CheckBox(&g_Config.bEnableAutoLoad, sy->T("Auto Load Newest Savestate")));
|
||||
|
||||
#if defined(USING_WIN_UI)
|
||||
systemSettings->Add(new CheckBox(&g_Config.bBypassOSKWithKeyboard, s->T("Enable Windows native keyboard", "Enable Windows native keyboard")));
|
||||
systemSettings->Add(new CheckBox(&g_Config.bBypassOSKWithKeyboard, sy->T("Enable Windows native keyboard", "Enable Windows native keyboard")));
|
||||
#endif
|
||||
#if defined(_WIN32)
|
||||
SavePathInMyDocumentChoice = systemSettings->Add(new CheckBox(&installed_, s->T("Save path in My Documents", "Save path in My Documents")));
|
||||
SavePathInMyDocumentChoice = systemSettings->Add(new CheckBox(&installed_, sy->T("Save path in My Documents", "Save path in My Documents")));
|
||||
SavePathInMyDocumentChoice->OnClick.Handle(this, &GameSettingsScreen::OnSavePathMydoc);
|
||||
SavePathInOtherChoice = systemSettings->Add(new CheckBox(&otherinstalled_, s->T("Save path in installed.txt", "Save path in installed.txt")));
|
||||
SavePathInOtherChoice = systemSettings->Add(new CheckBox(&otherinstalled_, sy->T("Save path in installed.txt", "Save path in installed.txt")));
|
||||
SavePathInOtherChoice->SetEnabled(false);
|
||||
SavePathInOtherChoice->OnClick.Handle(this, &GameSettingsScreen::OnSavePathOther);
|
||||
wchar_t myDocumentsPath[MAX_PATH];
|
||||
@ -574,36 +574,36 @@ void GameSettingsScreen::CreateViews() {
|
||||
#endif
|
||||
|
||||
#if defined(_M_X64)
|
||||
systemSettings->Add(new CheckBox(&g_Config.bCacheFullIsoInRam, s->T("Cache ISO in RAM", "Cache full ISO in RAM (slow startup)")));
|
||||
systemSettings->Add(new CheckBox(&g_Config.bCacheFullIsoInRam, sy->T("Cache ISO in RAM", "Cache full ISO in RAM (slow startup)")));
|
||||
#endif
|
||||
|
||||
//#ifndef ANDROID
|
||||
systemSettings->Add(new ItemHeader(s->T("Cheats", "Cheats (experimental, see forums)")));
|
||||
systemSettings->Add(new CheckBox(&g_Config.bEnableCheats, s->T("Enable Cheats")));
|
||||
systemSettings->Add(new ItemHeader(sy->T("Cheats", "Cheats (experimental, see forums)")));
|
||||
systemSettings->Add(new CheckBox(&g_Config.bEnableCheats, sy->T("Enable Cheats")));
|
||||
//#endif
|
||||
systemSettings->SetSpacing(0);
|
||||
|
||||
systemSettings->Add(new ItemHeader(s->T("PSP Settings")));
|
||||
systemSettings->Add(new ItemHeader(sy->T("PSP Settings")));
|
||||
static const char *models[] = {"PSP-1000" , "PSP-2000/3000"};
|
||||
systemSettings->Add(new PopupMultiChoice(&g_Config.iPSPModel, s->T("PSP Model"), models, 0, ARRAY_SIZE(models), s, screenManager()))->SetEnabled(!PSP_IsInited());
|
||||
systemSettings->Add(new PopupMultiChoice(&g_Config.iPSPModel, sy->T("PSP Model"), models, 0, ARRAY_SIZE(models), sy, screenManager()))->SetEnabled(!PSP_IsInited());
|
||||
// TODO: Come up with a way to display a keyboard for mobile users,
|
||||
// so until then, this is Windows/Desktop only.
|
||||
#if defined(_WIN32) // TODO: Add all platforms where KEY_CHAR support is added
|
||||
systemSettings->Add(new PopupTextInputChoice(&g_Config.sNickName, s->T("Change Nickname"), "", 32, screenManager()));
|
||||
systemSettings->Add(new PopupTextInputChoice(&g_Config.sNickName, sy->T("Change Nickname"), "", 32, screenManager()));
|
||||
#elif defined(USING_QT_UI)
|
||||
systemSettings->Add(new Choice(s->T("Change Nickname")))->OnClick.Handle(this, &GameSettingsScreen::OnChangeNickname);
|
||||
systemSettings->Add(new Choice(sy->T("Change Nickname")))->OnClick.Handle(this, &GameSettingsScreen::OnChangeNickname);
|
||||
#endif
|
||||
#if defined(_WIN32) || (defined(USING_QT_UI) && !defined(MOBILE_DEVICE))
|
||||
// Screenshot functionality is not yet available on non-Windows/non-Qt
|
||||
systemSettings->Add(new CheckBox(&g_Config.bScreenshotsAsPNG, s->T("Screenshots as PNG")));
|
||||
systemSettings->Add(new CheckBox(&g_Config.bScreenshotsAsPNG, sy->T("Screenshots as PNG")));
|
||||
#endif
|
||||
systemSettings->Add(new CheckBox(&g_Config.bDayLightSavings, s->T("Day Light Saving")));
|
||||
systemSettings->Add(new CheckBox(&g_Config.bDayLightSavings, sy->T("Day Light Saving")));
|
||||
static const char *dateFormat[] = { "YYYYMMDD", "MMDDYYYY", "DDMMYYYY"};
|
||||
systemSettings->Add(new PopupMultiChoice(&g_Config.iDateFormat, s->T("Date Format"), dateFormat, 1, 3, s, screenManager()));
|
||||
systemSettings->Add(new PopupMultiChoice(&g_Config.iDateFormat, sy->T("Date Format"), dateFormat, 1, 3, sy, screenManager()));
|
||||
static const char *timeFormat[] = { "12HR", "24HR"};
|
||||
systemSettings->Add(new PopupMultiChoice(&g_Config.iTimeFormat, s->T("Time Format"), timeFormat, 1, 2, s, screenManager()));
|
||||
systemSettings->Add(new PopupMultiChoice(&g_Config.iTimeFormat, sy->T("Time Format"), timeFormat, 1, 2, sy, screenManager()));
|
||||
static const char *buttonPref[] = { "Use O to confirm", "Use X to confirm" };
|
||||
systemSettings->Add(new PopupMultiChoice(&g_Config.iButtonPreference, s->T("Confirmation Button"), buttonPref, 0, 2, s, screenManager()));
|
||||
systemSettings->Add(new PopupMultiChoice(&g_Config.iButtonPreference, sy->T("Confirmation Button"), buttonPref, 0, 2, sy, screenManager()));
|
||||
}
|
||||
|
||||
UI::EventReturn GameSettingsScreen::OnAutoFrameskip(UI::EventParams &e) {
|
||||
@ -638,8 +638,8 @@ static void RecreateActivity() {
|
||||
if (System_GetPropertyInt(SYSPROP_SYSTEMVERSION) >= SYSTEM_JELLYBEAN) {
|
||||
System_SendMessage("recreate", "");
|
||||
} else {
|
||||
I18NCategory *gs = GetI18NCategory("Graphics");
|
||||
System_SendMessage("toast", gs->T("Must Restart", "You must restart PPSSPP for this change to take effect"));
|
||||
I18NCategory *gr = GetI18NCategory("Graphics");
|
||||
System_SendMessage("toast", gr->T("Must Restart", "You must restart PPSSPP for this change to take effect"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -864,11 +864,11 @@ void GameSettingsScreen::CallbackRenderingBackend(bool yes) {
|
||||
|
||||
UI::EventReturn GameSettingsScreen::OnRenderingBackend(UI::EventParams &e) {
|
||||
#if defined(_WIN32)
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
|
||||
// It only makes sense to show the restart prompt if the backend was actually changed.
|
||||
if (g_Config.iTempGPUBackend != g_Config.iGPUBackend) {
|
||||
screenManager()->push(new PromptScreen(d->T("ChangingGPUBackends", "Changing GPU backends requires PPSSPP to restart. Restart now?"), d->T("Yes"), d->T("No"),
|
||||
screenManager()->push(new PromptScreen(di->T("ChangingGPUBackends", "Changing GPU backends requires PPSSPP to restart. Restart now?"), di->T("Yes"), di->T("No"),
|
||||
std::bind(&GameSettingsScreen::CallbackRenderingBackend, this, placeholder::_1)));
|
||||
}
|
||||
#endif
|
||||
@ -934,8 +934,8 @@ UI::EventReturn GameSettingsScreen::OnLanguageChange(UI::EventParams &e) {
|
||||
}
|
||||
|
||||
UI::EventReturn GameSettingsScreen::OnPostProcShader(UI::EventParams &e) {
|
||||
I18NCategory *g = GetI18NCategory("Graphics");
|
||||
auto procScreen = new PostProcScreen(g->T("Postprocessing Shader"));
|
||||
I18NCategory *gr = GetI18NCategory("Graphics");
|
||||
auto procScreen = new PostProcScreen(gr->T("Postprocessing Shader"));
|
||||
procScreen->OnChoice.Handle(this, &GameSettingsScreen::OnPostProcShaderChange);
|
||||
screenManager()->push(procScreen);
|
||||
return UI::EVENT_DONE;
|
||||
@ -990,25 +990,25 @@ void DeveloperToolsScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
root_ = new ScrollView(ORIENT_VERTICAL);
|
||||
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
I18NCategory *dev = GetI18NCategory("Developer");
|
||||
I18NCategory *gs = GetI18NCategory("Graphics");
|
||||
I18NCategory *gr = GetI18NCategory("Graphics");
|
||||
I18NCategory *a = GetI18NCategory("Audio");
|
||||
I18NCategory *s = GetI18NCategory("System");
|
||||
I18NCategory *sy = GetI18NCategory("System");
|
||||
|
||||
LinearLayout *list = root_->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(1.0f)));
|
||||
list->SetSpacing(0);
|
||||
list->Add(new ItemHeader(s->T("General")));
|
||||
list->Add(new ItemHeader(sy->T("General")));
|
||||
|
||||
bool canUseJit = true;
|
||||
#ifdef IOS
|
||||
if (!iosCanUseJit) {
|
||||
canUseJit = false;
|
||||
list->Add(new TextView(s->T("DynarecisJailed", "Dynarec (JIT) - (Not jailbroken - JIT not available)")));
|
||||
list->Add(new TextView(sy->T("DynarecisJailed", "Dynarec (JIT) - (Not jailbroken - JIT not available)")));
|
||||
}
|
||||
#endif
|
||||
if (canUseJit) {
|
||||
list->Add(new CheckBox(&g_Config.bJit, s->T("Dynarec", "Dynarec (JIT)")))->OnClick.Handle(this, &DeveloperToolsScreen::OnJitAffectingSetting);
|
||||
list->Add(new CheckBox(&g_Config.bJit, sy->T("Dynarec", "Dynarec (JIT)")))->OnClick.Handle(this, &DeveloperToolsScreen::OnJitAffectingSetting);
|
||||
}
|
||||
|
||||
list->Add(new CheckBox(&g_Config.bShowDeveloperMenu, dev->T("Show Developer Menu")));
|
||||
@ -1031,7 +1031,7 @@ void DeveloperToolsScreen::CreateViews() {
|
||||
list->Add(new Choice(dev->T("Load language ini")))->OnClick.Handle(this, &DeveloperToolsScreen::OnLoadLanguageIni);
|
||||
list->Add(new Choice(dev->T("Save language ini")))->OnClick.Handle(this, &DeveloperToolsScreen::OnSaveLanguageIni);
|
||||
list->Add(new ItemHeader(""));
|
||||
list->Add(new Choice(d->T("Back")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
list->Add(new Choice(di->T("Back")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
}
|
||||
|
||||
void DeveloperToolsScreen::onFinish(DialogResult result) {
|
||||
@ -1046,17 +1046,17 @@ void GameSettingsScreen::CallbackRestoreDefaults(bool yes) {
|
||||
|
||||
UI::EventReturn GameSettingsScreen::OnRestoreDefaultSettings(UI::EventParams &e) {
|
||||
I18NCategory *dev = GetI18NCategory("Developer");
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
if (g_Config.bGameSpecific)
|
||||
{
|
||||
screenManager()->push(
|
||||
new PromptScreen(dev->T("RestoreGameDefaultSettings", "Are you sure you want to restore the game-specific settings back to the ppsspp defaults?\n"), d->T("OK"), d->T("Cancel"),
|
||||
new PromptScreen(dev->T("RestoreGameDefaultSettings", "Are you sure you want to restore the game-specific settings back to the ppsspp defaults?\n"), di->T("OK"), di->T("Cancel"),
|
||||
std::bind(&GameSettingsScreen::CallbackRestoreDefaults, this, placeholder::_1)));
|
||||
}
|
||||
else
|
||||
{
|
||||
screenManager()->push(
|
||||
new PromptScreen(dev->T("RestoreDefaultSettings", "Are you sure you want to restore all settings(except control mapping)\nback to their defaults?\nYou can't undo this.\nPlease restart PPSSPP after restoring settings."), d->T("OK"), d->T("Cancel"),
|
||||
new PromptScreen(dev->T("RestoreDefaultSettings", "Are you sure you want to restore all settings(except control mapping)\nback to their defaults?\nYou can't undo this.\nPlease restart PPSSPP after restoring settings."), di->T("OK"), di->T("Cancel"),
|
||||
std::bind(&GameSettingsScreen::CallbackRestoreDefaults, this, placeholder::_1)));
|
||||
}
|
||||
|
||||
@ -1095,14 +1095,14 @@ UI::EventReturn DeveloperToolsScreen::OnJitAffectingSetting(UI::EventParams &e)
|
||||
|
||||
void ProAdhocServerScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
I18NCategory *s = GetI18NCategory("System");
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *sy = GetI18NCategory("System");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
|
||||
tempProAdhocServer = g_Config.proAdhocServer;
|
||||
root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
LinearLayout *leftColumn = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
|
||||
leftColumn->Add(new ItemHeader(s->T("proAdhocServer Address:")));
|
||||
leftColumn->Add(new ItemHeader(sy->T("proAdhocServer Address:")));
|
||||
addrView_ = new TextView(tempProAdhocServer, ALIGN_LEFT, false);
|
||||
leftColumn->Add(addrView_);
|
||||
LinearLayout *rightColumn = new LinearLayout(ORIENT_HORIZONTAL, new AnchorLayoutParams(0, 120, 10, NONE, NONE,10));
|
||||
@ -1117,10 +1117,10 @@ void ProAdhocServerScreen::CreateViews() {
|
||||
rightColumn->Add(new Button("8"))->OnClick.Handle(this, &ProAdhocServerScreen::On8Click);
|
||||
rightColumn->Add(new Button("9"))->OnClick.Handle(this, &ProAdhocServerScreen::On9Click);
|
||||
rightColumn->Add(new Button("."))->OnClick.Handle(this, &ProAdhocServerScreen::OnPointClick);
|
||||
rightColumn->Add(new Button(d->T("Delete")))->OnClick.Handle(this, &ProAdhocServerScreen::OnDeleteClick);
|
||||
rightColumn->Add(new Button(d->T("Delete all")))->OnClick.Handle(this, &ProAdhocServerScreen::OnDeleteAllClick);
|
||||
rightColumn->Add(new Button(d->T("OK")))->OnClick.Handle(this, &ProAdhocServerScreen::OnOKClick);
|
||||
rightColumn->Add(new Button(d->T("Cancel")))->OnClick.Handle(this, &ProAdhocServerScreen::OnCancelClick);
|
||||
rightColumn->Add(new Button(di->T("Delete")))->OnClick.Handle(this, &ProAdhocServerScreen::OnDeleteClick);
|
||||
rightColumn->Add(new Button(di->T("Delete all")))->OnClick.Handle(this, &ProAdhocServerScreen::OnDeleteAllClick);
|
||||
rightColumn->Add(new Button(di->T("OK")))->OnClick.Handle(this, &ProAdhocServerScreen::OnOKClick);
|
||||
rightColumn->Add(new Button(di->T("Cancel")))->OnClick.Handle(this, &ProAdhocServerScreen::OnCancelClick);
|
||||
root_->Add(leftColumn);
|
||||
root_->Add(rightColumn);
|
||||
}
|
||||
|
@ -416,15 +416,15 @@ UI::EventReturn GameBrowser::HomeClick(UI::EventParams &e) {
|
||||
#ifdef ANDROID
|
||||
path_.SetPath(g_Config.memStickDirectory);
|
||||
#elif defined(USING_QT_UI)
|
||||
I18NCategory *m = GetI18NCategory("MainMenu");
|
||||
I18NCategory *mm = GetI18NCategory("MainMenu");
|
||||
QString fileName = QFileDialog::getExistingDirectory(NULL, "Browse for Folder", g_Config.currentDirectory.c_str());
|
||||
if (QDir(fileName).exists())
|
||||
path_.SetPath(fileName.toStdString());
|
||||
else
|
||||
return UI::EVENT_DONE;
|
||||
#elif defined(_WIN32)
|
||||
I18NCategory *m = GetI18NCategory("MainMenu");
|
||||
std::string folder = W32Util::BrowseForFolder(MainWindow::GetHWND(), m->T("Choose folder"));
|
||||
I18NCategory *mm = GetI18NCategory("MainMenu");
|
||||
std::string folder = W32Util::BrowseForFolder(MainWindow::GetHWND(), mm->T("Choose folder"));
|
||||
if (!folder.size())
|
||||
return UI::EVENT_DONE;
|
||||
path_.SetPath(folder);
|
||||
@ -458,7 +458,7 @@ void GameBrowser::Refresh() {
|
||||
Clear();
|
||||
|
||||
Add(new Spacer(1.0f));
|
||||
I18NCategory *m = GetI18NCategory("MainMenu");
|
||||
I18NCategory *mm = GetI18NCategory("MainMenu");
|
||||
|
||||
// No topbar on recent screen
|
||||
if (path_.GetPath() != "!RECENT") {
|
||||
@ -468,9 +468,9 @@ void GameBrowser::Refresh() {
|
||||
Margins pathMargins(5, 0);
|
||||
topBar->Add(new TextView(path_.GetFriendlyPath().c_str(), ALIGN_VCENTER, true, new LinearLayoutParams(1.0f)));
|
||||
#if defined(_WIN32) || defined(USING_QT_UI)
|
||||
topBar->Add(new Choice(m->T("Browse", "Browse...")))->OnClick.Handle(this, &GameBrowser::HomeClick);
|
||||
topBar->Add(new Choice(mm->T("Browse", "Browse...")))->OnClick.Handle(this, &GameBrowser::HomeClick);
|
||||
#else
|
||||
topBar->Add(new Choice(m->T("Home")))->OnClick.Handle(this, &GameBrowser::HomeClick);
|
||||
topBar->Add(new Choice(mm->T("Home")))->OnClick.Handle(this, &GameBrowser::HomeClick);
|
||||
#endif
|
||||
} else {
|
||||
topBar->Add(new Spacer(new LinearLayoutParams(1.0f)));
|
||||
@ -571,7 +571,7 @@ void GameBrowser::Refresh() {
|
||||
if (allowBrowsing_) {
|
||||
std::string caption = IsCurrentPathPinned() ? "-" : "+";
|
||||
if (!*gridStyle_) {
|
||||
caption = IsCurrentPathPinned() ? m->T("UnpinPath", "Unpin") : m->T("PinPath", "Pin");
|
||||
caption = IsCurrentPathPinned() ? mm->T("UnpinPath", "Unpin") : mm->T("PinPath", "Pin");
|
||||
}
|
||||
gameList_->Add(new UI::Button(caption, new UI::LinearLayoutParams(UI::FILL_PARENT, UI::FILL_PARENT)))->
|
||||
OnClick.Handle(this, &GameBrowser::PinToggleClick);
|
||||
@ -579,7 +579,7 @@ void GameBrowser::Refresh() {
|
||||
|
||||
if (g_Config.bHomebrewStore && (flags_ & FLAG_HOMEBREWSTOREBUTTON)) {
|
||||
Add(new Spacer());
|
||||
homebrewStoreButton_ = Add(new Choice(m->T("DownloadFromStore", "Download from the PPSSPP Homebrew Store"), new UI::LinearLayoutParams(UI::WRAP_CONTENT, UI::WRAP_CONTENT)));
|
||||
homebrewStoreButton_ = Add(new Choice(mm->T("DownloadFromStore", "Download from the PPSSPP Homebrew Store"), new UI::LinearLayoutParams(UI::WRAP_CONTENT, UI::WRAP_CONTENT)));
|
||||
} else {
|
||||
homebrewStoreButton_ = 0;
|
||||
}
|
||||
@ -702,7 +702,7 @@ void MainScreen::CreateViews() {
|
||||
|
||||
bool vertical = UseVerticalLayout();
|
||||
|
||||
I18NCategory *m = GetI18NCategory("MainMenu");
|
||||
I18NCategory *mm = GetI18NCategory("MainMenu");
|
||||
|
||||
Margins actionMenuMargins(0, 10, 10, 0);
|
||||
|
||||
@ -717,7 +717,7 @@ void MainScreen::CreateViews() {
|
||||
"!RECENT", false, &g_Config.bGridView1, "", "", 0,
|
||||
new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
scrollRecentGames->Add(tabRecentGames);
|
||||
leftColumn->AddTab(m->T("Recent"), scrollRecentGames);
|
||||
leftColumn->AddTab(mm->T("Recent"), scrollRecentGames);
|
||||
tabRecentGames->OnChoice.Handle(this, &MainScreen::OnGameSelectedInstant);
|
||||
tabRecentGames->OnHoldChoice.Handle(this, &MainScreen::OnGameSelected);
|
||||
tabRecentGames->OnHighlight.Handle(this, &MainScreen::OnGameHighlight);
|
||||
@ -727,10 +727,10 @@ void MainScreen::CreateViews() {
|
||||
ScrollView *scrollHomebrew = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
|
||||
GameBrowser *tabAllGames = new GameBrowser(g_Config.currentDirectory, true, &g_Config.bGridView2,
|
||||
m->T("How to get games"), "http://www.ppsspp.org/getgames.html", 0,
|
||||
mm->T("How to get games"), "http://www.ppsspp.org/getgames.html", 0,
|
||||
new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
GameBrowser *tabHomebrew = new GameBrowser(GetSysDirectory(DIRECTORY_GAME), false, &g_Config.bGridView3,
|
||||
m->T("How to get homebrew & demos", "How to get homebrew && demos"), "http://www.ppsspp.org/gethomebrew.html",
|
||||
mm->T("How to get homebrew & demos", "How to get homebrew && demos"), "http://www.ppsspp.org/gethomebrew.html",
|
||||
FLAG_HOMEBREWSTOREBUTTON,
|
||||
new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
|
||||
@ -742,8 +742,8 @@ void MainScreen::CreateViews() {
|
||||
scrollAllGames->Add(tabAllGames);
|
||||
scrollHomebrew->Add(tabHomebrew);
|
||||
|
||||
leftColumn->AddTab(m->T("Games"), scrollAllGames);
|
||||
leftColumn->AddTab(m->T("Homebrew & Demos"), scrollHomebrew);
|
||||
leftColumn->AddTab(mm->T("Games"), scrollAllGames);
|
||||
leftColumn->AddTab(mm->T("Homebrew & Demos"), scrollHomebrew);
|
||||
|
||||
tabAllGames->OnChoice.Handle(this, &MainScreen::OnGameSelectedInstant);
|
||||
tabHomebrew->OnChoice.Handle(this, &MainScreen::OnGameSelectedInstant);
|
||||
@ -791,18 +791,18 @@ void MainScreen::CreateViews() {
|
||||
rightColumnItems->Add(logos);
|
||||
rightColumnItems->Add(new TextView(versionString, new LinearLayoutParams(Margins(70, -6, 0, 0))))->SetSmall(true);
|
||||
#if defined(_WIN32) || defined(USING_QT_UI)
|
||||
rightColumnItems->Add(new Choice(m->T("Load","Load...")))->OnClick.Handle(this, &MainScreen::OnLoadFile);
|
||||
rightColumnItems->Add(new Choice(mm->T("Load","Load...")))->OnClick.Handle(this, &MainScreen::OnLoadFile);
|
||||
#endif
|
||||
rightColumnItems->Add(new Choice(m->T("Game Settings", "Settings")))->OnClick.Handle(this, &MainScreen::OnGameSettings);
|
||||
rightColumnItems->Add(new Choice(m->T("Credits")))->OnClick.Handle(this, &MainScreen::OnCredits);
|
||||
rightColumnItems->Add(new Choice(m->T("www.ppsspp.org")))->OnClick.Handle(this, &MainScreen::OnPPSSPPOrg);
|
||||
rightColumnItems->Add(new Choice(mm->T("Game Settings", "Settings")))->OnClick.Handle(this, &MainScreen::OnGameSettings);
|
||||
rightColumnItems->Add(new Choice(mm->T("Credits")))->OnClick.Handle(this, &MainScreen::OnCredits);
|
||||
rightColumnItems->Add(new Choice(mm->T("www.ppsspp.org")))->OnClick.Handle(this, &MainScreen::OnPPSSPPOrg);
|
||||
#ifndef GOLD
|
||||
Choice *gold = rightColumnItems->Add(new Choice(m->T("Support PPSSPP")));
|
||||
Choice *gold = rightColumnItems->Add(new Choice(mm->T("Support PPSSPP")));
|
||||
gold->OnClick.Handle(this, &MainScreen::OnSupport);
|
||||
gold->SetIcon(I_ICONGOLD);
|
||||
#endif
|
||||
rightColumnItems->Add(new Spacer(25.0));
|
||||
rightColumnItems->Add(new Choice(m->T("Exit")))->OnClick.Handle(this, &MainScreen::OnExit);
|
||||
rightColumnItems->Add(new Choice(mm->T("Exit")))->OnClick.Handle(this, &MainScreen::OnExit);
|
||||
|
||||
if (vertical) {
|
||||
root_ = new LinearLayout(ORIENT_VERTICAL);
|
||||
@ -1093,8 +1093,8 @@ void MainScreen::dialogFinished(const Screen *dialog, DialogResult result) {
|
||||
void UmdReplaceScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
Margins actionMenuMargins(0, 100, 15, 0);
|
||||
I18NCategory *m = GetI18NCategory("MainMenu");
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *mm = GetI18NCategory("MainMenu");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
|
||||
TabHolder *leftColumn = new TabHolder(ORIENT_HORIZONTAL, 64, new LinearLayoutParams(1.0));
|
||||
leftColumn->SetClip(true);
|
||||
@ -1110,26 +1110,26 @@ void UmdReplaceScreen::CreateViews() {
|
||||
"!RECENT", false, &g_Config.bGridView1, "", "", 0,
|
||||
new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
scrollRecentGames->Add(tabRecentGames);
|
||||
leftColumn->AddTab(m->T("Recent"), scrollRecentGames);
|
||||
leftColumn->AddTab(mm->T("Recent"), scrollRecentGames);
|
||||
tabRecentGames->OnChoice.Handle(this, &UmdReplaceScreen::OnGameSelectedInstant);
|
||||
tabRecentGames->OnHoldChoice.Handle(this, &UmdReplaceScreen::OnGameSelected);
|
||||
}
|
||||
ScrollView *scrollAllGames = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
|
||||
GameBrowser *tabAllGames = new GameBrowser(g_Config.currentDirectory, true, &g_Config.bGridView2,
|
||||
m->T("How to get games"), "http://www.ppsspp.org/getgames.html", 0,
|
||||
mm->T("How to get games"), "http://www.ppsspp.org/getgames.html", 0,
|
||||
new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
|
||||
scrollAllGames->Add(tabAllGames);
|
||||
|
||||
leftColumn->AddTab(m->T("Games"), scrollAllGames);
|
||||
leftColumn->AddTab(mm->T("Games"), scrollAllGames);
|
||||
|
||||
tabAllGames->OnChoice.Handle(this, &UmdReplaceScreen::OnGameSelectedInstant);
|
||||
|
||||
tabAllGames->OnHoldChoice.Handle(this, &UmdReplaceScreen::OnGameSelected);
|
||||
|
||||
rightColumnItems->Add(new Choice(d->T("Cancel")))->OnClick.Handle(this, &UmdReplaceScreen::OnCancel);
|
||||
rightColumnItems->Add(new Choice(m->T("Game Settings")))->OnClick.Handle(this, &UmdReplaceScreen::OnGameSettings);
|
||||
rightColumnItems->Add(new Choice(di->T("Cancel")))->OnClick.Handle(this, &UmdReplaceScreen::OnCancel);
|
||||
rightColumnItems->Add(new Choice(mm->T("Game Settings")))->OnClick.Handle(this, &UmdReplaceScreen::OnGameSettings);
|
||||
|
||||
if (g_Config.recentIsos.size() > 0) {
|
||||
leftColumn->SetCurrentTab(0);
|
||||
|
@ -212,9 +212,9 @@ void UIDialogScreenWithBackground::sendMessage(const char *message, const char *
|
||||
|
||||
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());
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
yesButtonText_ = di->T(yesButtonText.c_str());
|
||||
noButtonText_ = di->T(noButtonText.c_str());
|
||||
}
|
||||
|
||||
void PromptScreen::CreateViews() {
|
||||
@ -422,10 +422,10 @@ void LogoScreen::render() {
|
||||
|
||||
::DrawBackground(dc, alpha);
|
||||
|
||||
I18NCategory *c = GetI18NCategory("PSPCredits");
|
||||
I18NCategory *cr = GetI18NCategory("PSPCredits");
|
||||
char temp[256];
|
||||
// Manually formatting utf-8 is fun. \xXX doesn't work everywhere.
|
||||
snprintf(temp, sizeof(temp), "%s Henrik Rydg%c%crd", c->T("created", "Created by"), 0xC3, 0xA5);
|
||||
snprintf(temp, sizeof(temp), "%s Henrik Rydg%c%crd", cr->T("created", "Created by"), 0xC3, 0xA5);
|
||||
#ifdef GOLD
|
||||
dc.Draw()->DrawImage(I_ICONGOLD, bounds.centerX() - 120, bounds.centerY() - 30, 1.2f, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER);
|
||||
#else
|
||||
@ -436,7 +436,7 @@ void LogoScreen::render() {
|
||||
dc.SetFontScale(1.0f, 1.0f);
|
||||
dc.SetFontStyle(dc.theme->uiFont);
|
||||
dc.DrawText(temp, bounds.centerX(), bounds.centerY() + 40, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER);
|
||||
dc.DrawText(c->T("license", "Free Software under GPL 2.0"), bounds.centerX(), bounds.centerY() + 70, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER);
|
||||
dc.DrawText(cr->T("license", "Free Software under GPL 2.0"), bounds.centerX(), bounds.centerY() + 70, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER);
|
||||
dc.DrawText("www.ppsspp.org", bounds.centerX(), yres / 2 + 130, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER);
|
||||
if (boot_filename.size()) {
|
||||
dc.DrawTextShadow(boot_filename.c_str(), bounds.centerX(), bounds.centerY() + 180, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER);
|
||||
@ -456,21 +456,21 @@ void LogoScreen::render() {
|
||||
|
||||
void CreditsScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *c = GetI18NCategory("PSPCredits");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
I18NCategory *cr = GetI18NCategory("PSPCredits");
|
||||
|
||||
root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
Button *back = root_->Add(new Button(d->T("Back"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 10, false)));
|
||||
Button *back = root_->Add(new Button(di->T("Back"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 10, false)));
|
||||
back->OnClick.Handle(this, &CreditsScreen::OnOK);
|
||||
root_->SetDefaultFocusView(back);
|
||||
#ifndef GOLD
|
||||
root_->Add(new Button(c->T("Buy Gold"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 10, false)))->OnClick.Handle(this, &CreditsScreen::OnSupport);
|
||||
root_->Add(new Button(cr->T("Buy Gold"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 10, false)))->OnClick.Handle(this, &CreditsScreen::OnSupport);
|
||||
#endif
|
||||
root_->Add(new Button(c->T("PPSSPP Forums"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnForums);
|
||||
root_->Add(new Button(cr->T("PPSSPP Forums"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnForums);
|
||||
root_->Add(new Button("www.ppsspp.org", new AnchorLayoutParams(260, 64, 10, NONE, NONE, 158, false)))->OnClick.Handle(this, &CreditsScreen::OnPPSSPPOrg);
|
||||
#ifdef ANDROID
|
||||
root_->Add(new Button(c->T("Share PPSSPP"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnShare);
|
||||
root_->Add(new Button(c->T("Twitter @PPSSPP_emu"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 154, false)))->OnClick.Handle(this, &CreditsScreen::OnTwitter);
|
||||
root_->Add(new Button(cr->T("Share PPSSPP"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnShare);
|
||||
root_->Add(new Button(cr->T("Twitter @PPSSPP_emu"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 154, false)))->OnClick.Handle(this, &CreditsScreen::OnTwitter);
|
||||
#endif
|
||||
#ifdef GOLD
|
||||
root_->Add(new ImageView(I_ICONGOLD, IS_DEFAULT, new AnchorLayoutParams(100, 64, 10, 10, NONE, NONE, false)));
|
||||
@ -508,8 +508,8 @@ UI::EventReturn CreditsScreen::OnForums(UI::EventParams &e) {
|
||||
}
|
||||
|
||||
UI::EventReturn CreditsScreen::OnShare(UI::EventParams &e) {
|
||||
I18NCategory *c = GetI18NCategory("PSPCredits");
|
||||
System_SendMessage("sharetext", c->T("CheckOutPPSSPP", "Check out PPSSPP, the awesome PSP emulator: http://www.ppsspp.org/"));
|
||||
I18NCategory *cr = GetI18NCategory("PSPCredits");
|
||||
System_SendMessage("sharetext", cr->T("CheckOutPPSSPP", "Check out PPSSPP, the awesome PSP emulator: http://www.ppsspp.org/"));
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
@ -530,19 +530,19 @@ void CreditsScreen::update(InputState &input_state) {
|
||||
void CreditsScreen::render() {
|
||||
UIScreen::render();
|
||||
|
||||
I18NCategory *c = GetI18NCategory("PSPCredits");
|
||||
I18NCategory *cr = GetI18NCategory("PSPCredits");
|
||||
|
||||
const char * credits[] = {
|
||||
"PPSSPP",
|
||||
"",
|
||||
c->T("title", "A fast and portable PSP emulator"),
|
||||
cr->T("title", "A fast and portable PSP emulator"),
|
||||
"",
|
||||
"",
|
||||
c->T("created", "Created by"),
|
||||
cr->T("created", "Created by"),
|
||||
"Henrik Rydg\xc3\xa5rd",
|
||||
"",
|
||||
"",
|
||||
c->T("contributors", "Contributors:"),
|
||||
cr->T("contributors", "Contributors:"),
|
||||
"unknownbrackets",
|
||||
"oioitff",
|
||||
"xsacha",
|
||||
@ -582,7 +582,7 @@ void CreditsScreen::render() {
|
||||
"Kyhel",
|
||||
"",
|
||||
"",
|
||||
c->T("specialthanks", "Special thanks to:"),
|
||||
cr->T("specialthanks", "Special thanks to:"),
|
||||
"Maxim for his amazing Atrac3+ decoder work",
|
||||
"Keith Galocy at nVidia (hw, advice)",
|
||||
"Orphis (build server)",
|
||||
@ -591,18 +591,18 @@ void CreditsScreen::render() {
|
||||
"solarmystic (testing)",
|
||||
"all the forum mods",
|
||||
"",
|
||||
c->T("this translation by", ""), // Empty string as this is the original :)
|
||||
c->T("translators1", ""),
|
||||
c->T("translators2", ""),
|
||||
c->T("translators3", ""),
|
||||
c->T("translators4", ""),
|
||||
c->T("translators5", ""),
|
||||
c->T("translators6", ""),
|
||||
cr->T("this translation by", ""), // Empty string as this is the original :)
|
||||
cr->T("translators1", ""),
|
||||
cr->T("translators2", ""),
|
||||
cr->T("translators3", ""),
|
||||
cr->T("translators4", ""),
|
||||
cr->T("translators5", ""),
|
||||
cr->T("translators6", ""),
|
||||
"",
|
||||
c->T("written", "Written in C++ for speed and portability"),
|
||||
cr->T("written", "Written in C++ for speed and portability"),
|
||||
"",
|
||||
"",
|
||||
c->T("tools", "Free tools used:"),
|
||||
cr->T("tools", "Free tools used:"),
|
||||
#ifdef ANDROID
|
||||
"Android SDK + NDK",
|
||||
#elif defined(BLACKBERRY)
|
||||
@ -619,22 +619,22 @@ void CreditsScreen::render() {
|
||||
"PSP SDK",
|
||||
"",
|
||||
"",
|
||||
c->T("website", "Check out the website:"),
|
||||
cr->T("website", "Check out the website:"),
|
||||
"www.ppsspp.org",
|
||||
c->T("list", "compatibility lists, forums, and development info"),
|
||||
cr->T("list", "compatibility lists, forums, and development info"),
|
||||
"",
|
||||
"",
|
||||
c->T("check", "Also check out Dolphin, the best Wii/GC emu around:"),
|
||||
cr->T("check", "Also check out Dolphin, the best Wii/GC emu around:"),
|
||||
"http://www.dolphin-emu.org",
|
||||
"",
|
||||
"",
|
||||
c->T("info1", "PPSSPP is only intended to play games you own."),
|
||||
c->T("info2", "Please make sure that you own the rights to any games"),
|
||||
c->T("info3", "you play by owning the UMD or by buying the digital"),
|
||||
c->T("info4", "download from the PSN store on your real PSP."),
|
||||
cr->T("info1", "PPSSPP is only intended to play games you own."),
|
||||
cr->T("info2", "Please make sure that you own the rights to any games"),
|
||||
cr->T("info3", "you play by owning the UMD or by buying the digital"),
|
||||
cr->T("info4", "download from the PSN store on your real PSP."),
|
||||
"",
|
||||
"",
|
||||
c->T("info5", "PSP is a trademark by Sony, Inc."),
|
||||
cr->T("info5", "PSP is a trademark by Sony, Inc."),
|
||||
};
|
||||
|
||||
|
||||
|
@ -447,7 +447,7 @@ void NativeInit(int argc, const char *argv[],
|
||||
else
|
||||
i18nrepo.LoadIni(g_Config.sLanguageIni, langOverridePath);
|
||||
|
||||
I18NCategory *d = GetI18NCategory("DesktopUI");
|
||||
I18NCategory *des = GetI18NCategory("DesktopUI");
|
||||
// Note to translators: do not translate this/add this to PPSSPP-lang's files.
|
||||
// It's intended to be custom for every user.
|
||||
// Only add it to your own personal copies of PPSSPP.
|
||||
@ -455,7 +455,7 @@ void NativeInit(int argc, const char *argv[],
|
||||
// TODO: Could allow a setting to specify a font file to load?
|
||||
// TODO: Make this a constant if we can sanely load the font on other systems?
|
||||
AddFontResourceEx(L"assets/Roboto-Condensed.ttf", FR_PRIVATE, NULL);
|
||||
g_Config.sFont = d->T("Font", "Roboto");
|
||||
g_Config.sFont = des->T("Font", "Roboto");
|
||||
#endif
|
||||
|
||||
if (!boot_filename.empty() && stateToLoad != NULL)
|
||||
|
@ -186,19 +186,19 @@ SaveSlotView::SaveSlotView(int slot, UI::LayoutParams *layoutParams) : UI::Linea
|
||||
AsyncImageFileView *fv = Add(new AsyncImageFileView(screenshotFilename_, IS_DEFAULT, wq, new UI::LayoutParams(82 * 2, 47 * 2)));
|
||||
fv->SetOverlayText(StringFromFormat("%i", slot_ + 1));
|
||||
|
||||
I18NCategory *i = GetI18NCategory("Pause");
|
||||
I18NCategory *pa = GetI18NCategory("Pause");
|
||||
|
||||
LinearLayout *buttons = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT));
|
||||
buttons->SetSpacing(2.0);
|
||||
Add(buttons);
|
||||
|
||||
saveStateButton_ = buttons->Add(new Button(i->T("Save State"), new LinearLayoutParams(0.0, G_VCENTER)));
|
||||
saveStateButton_ = buttons->Add(new Button(pa->T("Save State"), new LinearLayoutParams(0.0, G_VCENTER)));
|
||||
saveStateButton_->OnClick.Handle(this, &SaveSlotView::OnSaveState);
|
||||
|
||||
fv->OnClick.Handle(this, &SaveSlotView::OnScreenshotClick);
|
||||
|
||||
if (SaveState::HasSaveInSlot(slot)) {
|
||||
loadStateButton_ = buttons->Add(new Button(i->T("Load State"), new LinearLayoutParams(0.0, G_VCENTER)));
|
||||
loadStateButton_ = buttons->Add(new Button(pa->T("Load State"), new LinearLayoutParams(0.0, G_VCENTER)));
|
||||
loadStateButton_->OnClick.Handle(this, &SaveSlotView::OnLoadState);
|
||||
|
||||
std::string dateStr = SaveState::GetSlotDateAsString(slot_);
|
||||
@ -269,8 +269,8 @@ void GamePauseScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
Margins scrollMargins(0, 20, 0, 0);
|
||||
Margins actionMenuMargins(0, 20, 15, 0);
|
||||
I18NCategory *gs = GetI18NCategory("Graphics");
|
||||
I18NCategory *i = GetI18NCategory("Pause");
|
||||
I18NCategory *gr = GetI18NCategory("Graphics");
|
||||
I18NCategory *pa = GetI18NCategory("Pause");
|
||||
|
||||
root_ = new LinearLayout(ORIENT_HORIZONTAL);
|
||||
|
||||
@ -291,7 +291,7 @@ void GamePauseScreen::CreateViews() {
|
||||
leftColumnItems->Add(new Spacer(0.0));
|
||||
|
||||
if (g_Config.iRewindFlipFrequency > 0) {
|
||||
UI::Choice *rewindButton = leftColumnItems->Add(new Choice(i->T("Rewind")));
|
||||
UI::Choice *rewindButton = leftColumnItems->Add(new Choice(pa->T("Rewind")));
|
||||
rewindButton->SetEnabled(SaveState::CanRewind());
|
||||
rewindButton->OnClick.Handle(this, &GamePauseScreen::OnRewind);
|
||||
}
|
||||
@ -304,22 +304,22 @@ void GamePauseScreen::CreateViews() {
|
||||
|
||||
rightColumnItems->SetSpacing(0.0f);
|
||||
if (getUMDReplacePermit()) {
|
||||
rightColumnItems->Add(new Choice(i->T("Switch UMD")))->OnClick.Handle(this, &GamePauseScreen::OnSwitchUMD);
|
||||
rightColumnItems->Add(new Choice(pa->T("Switch UMD")))->OnClick.Handle(this, &GamePauseScreen::OnSwitchUMD);
|
||||
}
|
||||
Choice *continueChoice = rightColumnItems->Add(new Choice(i->T("Continue")));
|
||||
Choice *continueChoice = rightColumnItems->Add(new Choice(pa->T("Continue")));
|
||||
root_->SetDefaultFocusView(continueChoice);
|
||||
continueChoice->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
|
||||
std::string gameId = g_paramSFO.GetValueString("DISC_ID");
|
||||
if (g_Config.hasGameConfig(gameId)) {
|
||||
rightColumnItems->Add(new Choice(i->T("Game Settings")))->OnClick.Handle(this, &GamePauseScreen::OnGameSettings);
|
||||
rightColumnItems->Add(new Choice(i->T("Delete Game Config")))->OnClick.Handle(this, &GamePauseScreen::OnDeleteConfig);
|
||||
rightColumnItems->Add(new Choice(pa->T("Game Settings")))->OnClick.Handle(this, &GamePauseScreen::OnGameSettings);
|
||||
rightColumnItems->Add(new Choice(pa->T("Delete Game Config")))->OnClick.Handle(this, &GamePauseScreen::OnDeleteConfig);
|
||||
} else {
|
||||
rightColumnItems->Add(new Choice(i->T("Settings")))->OnClick.Handle(this, &GamePauseScreen::OnGameSettings);
|
||||
rightColumnItems->Add(new Choice(i->T("Create Game Config")))->OnClick.Handle(this, &GamePauseScreen::OnCreateConfig);
|
||||
rightColumnItems->Add(new Choice(pa->T("Settings")))->OnClick.Handle(this, &GamePauseScreen::OnGameSettings);
|
||||
rightColumnItems->Add(new Choice(pa->T("Create Game Config")))->OnClick.Handle(this, &GamePauseScreen::OnCreateConfig);
|
||||
}
|
||||
if (g_Config.bEnableCheats) {
|
||||
rightColumnItems->Add(new Choice(i->T("Cheats")))->OnClick.Handle(this, &GamePauseScreen::OnCwCheat);
|
||||
rightColumnItems->Add(new Choice(pa->T("Cheats")))->OnClick.Handle(this, &GamePauseScreen::OnCwCheat);
|
||||
}
|
||||
|
||||
// TODO, also might be nice to show overall compat rating here?
|
||||
@ -329,7 +329,7 @@ void GamePauseScreen::CreateViews() {
|
||||
rightColumnItems->Add(new Choice(rp->T("ReportButton", "Report Feedback")))->OnClick.Handle(this, &GamePauseScreen::OnReportFeedback);
|
||||
}
|
||||
rightColumnItems->Add(new Spacer(25.0));
|
||||
rightColumnItems->Add(new Choice(i->T("Exit to menu")))->OnClick.Handle(this, &GamePauseScreen::OnExitToMenu);
|
||||
rightColumnItems->Add(new Choice(pa->T("Exit to menu")))->OnClick.Handle(this, &GamePauseScreen::OnExitToMenu);
|
||||
}
|
||||
|
||||
UI::EventReturn GamePauseScreen::OnGameSettings(UI::EventParams &e) {
|
||||
@ -368,8 +368,8 @@ UI::EventReturn GamePauseScreen::OnScreenshotClicked(UI::EventParams &e) {
|
||||
if (SaveState::HasSaveInSlot(slot)) {
|
||||
std::string fn = v->GetScreenshotFilename();
|
||||
std::string title = v->GetScreenshotTitle();
|
||||
I18NCategory *p = GetI18NCategory("Pause");
|
||||
Screen *screen = new ScreenshotViewScreen(fn, title, v->GetSlot(), p);
|
||||
I18NCategory *pa = GetI18NCategory("Pause");
|
||||
Screen *screen = new ScreenshotViewScreen(fn, title, v->GetSlot(), pa);
|
||||
screenManager()->push(screen);
|
||||
}
|
||||
return UI::EVENT_DONE;
|
||||
@ -424,10 +424,10 @@ UI::EventReturn GamePauseScreen::OnCreateConfig(UI::EventParams &e)
|
||||
}
|
||||
UI::EventReturn GamePauseScreen::OnDeleteConfig(UI::EventParams &e)
|
||||
{
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
I18NCategory *ga = GetI18NCategory("Game");
|
||||
screenManager()->push(
|
||||
new PromptScreen(d->T("DeleteConfirmGameConfig", "Do you really want to delete the settings for this game?"), ga->T("ConfirmDelete"), d->T("Cancel"),
|
||||
new PromptScreen(di->T("DeleteConfirmGameConfig", "Do you really want to delete the settings for this game?"), ga->T("ConfirmDelete"), di->T("Cancel"),
|
||||
std::bind(&GamePauseScreen::CallbackDeleteConfig, this, placeholder::_1)));
|
||||
|
||||
return UI::EVENT_DONE;
|
||||
|
@ -131,7 +131,7 @@ EventReturn ReportScreen::HandleChoice(EventParams &e) {
|
||||
|
||||
void ReportScreen::CreateViews() {
|
||||
I18NCategory *rp = GetI18NCategory("Reporting");
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
Margins actionMenuMargins(0, 100, 15, 0);
|
||||
ViewGroup *leftColumn = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(WRAP_CONTENT, FILL_PARENT, 0.4f));
|
||||
LinearLayout *leftColumnItems = new LinearLayout(ORIENT_VERTICAL, new LayoutParams(WRAP_CONTENT, FILL_PARENT));
|
||||
@ -153,7 +153,7 @@ void ReportScreen::CreateViews() {
|
||||
submit_->SetEnabled(overall_ >= 0 && graphics_ >= 0 && speed_ >= 0 && gameplay_ >= 0);
|
||||
|
||||
rightColumnItems->Add(new Spacer(25.0));
|
||||
rightColumnItems->Add(new Choice(d->T("Back"), "", false, new AnchorLayoutParams(150, WRAP_CONTENT, 10, NONE, NONE, 10)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
rightColumnItems->Add(new Choice(di->T("Back"), "", false, new AnchorLayoutParams(150, WRAP_CONTENT, 10, NONE, NONE, 10)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
|
||||
root_ = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT, 1.0f));
|
||||
root_->Add(leftColumn);
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
LinearLayout *toprow = new LinearLayout(ORIENT_HORIZONTAL, new LayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
root->Add(toprow);
|
||||
|
||||
I18NCategory *s = GetI18NCategory("Savedata");
|
||||
I18NCategory *sa = GetI18NCategory("Savedata");
|
||||
if (ginfo->fileType == FILETYPE_PSP_SAVEDATA_DIRECTORY) {
|
||||
std::string savedata_detail = ginfo->paramSFO.GetValueString("SAVEDATA_DETAIL");
|
||||
std::string savedata_title = ginfo->paramSFO.GetValueString("SAVEDATA_TITLE");
|
||||
@ -89,7 +89,7 @@ public:
|
||||
PrioritizedWorkQueue *wq = g_gameInfoCache.WorkQueue();
|
||||
toprow->Add(new AsyncImageFileView(image_path, IS_DEFAULT, wq, new UI::LayoutParams(500, 500/16*9)));
|
||||
} else {
|
||||
toprow->Add(new TextView(s->T("No screenshot"), new LinearLayoutParams(Margins(10, 5))));
|
||||
toprow->Add(new TextView(sa->T("No screenshot"), new LinearLayoutParams(Margins(10, 5))));
|
||||
}
|
||||
root->Add(new TextView(GetFileDateAsString(savePath_), 0, true, new LinearLayoutParams(Margins(10, 5))));
|
||||
}
|
||||
@ -279,8 +279,8 @@ void SavedataBrowser::Refresh() {
|
||||
Clear();
|
||||
|
||||
Add(new Spacer(1.0f));
|
||||
I18NCategory *m = GetI18NCategory("MainMenu");
|
||||
I18NCategory *s = GetI18NCategory("Savedata");
|
||||
I18NCategory *mm = GetI18NCategory("MainMenu");
|
||||
I18NCategory *sa = GetI18NCategory("Savedata");
|
||||
|
||||
UI::LinearLayout *gl = new UI::LinearLayout(UI::ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
gl->SetSpacing(4.0f);
|
||||
@ -315,7 +315,7 @@ void SavedataBrowser::Refresh() {
|
||||
|
||||
if (savedataButtons.empty()) {
|
||||
ViewGroup *group = new LinearLayout(ORIENT_VERTICAL, new UI::LinearLayoutParams(UI::Margins(12, 0)));
|
||||
group->Add(new TextView(s->T("None yet. Things will appear here after you save.")));
|
||||
group->Add(new TextView(sa->T("None yet. Things will appear here after you save.")));
|
||||
gameList_->Add(group);
|
||||
}
|
||||
}
|
||||
@ -334,7 +334,7 @@ SavedataScreen::SavedataScreen(std::string gamePath) : UIDialogScreenWithGameBac
|
||||
|
||||
void SavedataScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
I18NCategory *s = GetI18NCategory("Savedata");
|
||||
I18NCategory *sa = GetI18NCategory("Savedata");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
std::string savedata_dir = GetSysDirectory(DIRECTORY_SAVEDATA);
|
||||
std::string savestate_dir = GetSysDirectory(DIRECTORY_SAVESTATE);
|
||||
@ -347,12 +347,12 @@ void SavedataScreen::CreateViews() {
|
||||
browser_ = scroll->Add(new SavedataBrowser(savedata_dir, new LayoutParams(FILL_PARENT, FILL_PARENT)));
|
||||
browser_->OnChoice.Handle(this, &SavedataScreen::OnSavedataButtonClick);
|
||||
|
||||
tabs->AddTab(s->T("Save Data"), scroll);
|
||||
tabs->AddTab(sa->T("Save Data"), scroll);
|
||||
|
||||
ScrollView *scroll2 = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
SavedataBrowser *browser2 = scroll2->Add(new SavedataBrowser(savestate_dir));
|
||||
browser2->OnChoice.Handle(this, &SavedataScreen::OnSavedataButtonClick);
|
||||
tabs->AddTab(s->T("Save States"), scroll2);
|
||||
tabs->AddTab(sa->T("Save States"), scroll2);
|
||||
|
||||
root_->Add(tabs);
|
||||
root_->Add(new Button(di->T("Back")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
|
@ -23,35 +23,35 @@
|
||||
void TiltAnalogSettingsScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
|
||||
I18NCategory *c = GetI18NCategory("Controls");
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *co = GetI18NCategory("Controls");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
|
||||
root_ = new ScrollView(ORIENT_VERTICAL);
|
||||
|
||||
LinearLayout *settings = new LinearLayout(ORIENT_VERTICAL);
|
||||
|
||||
settings->SetSpacing(0);
|
||||
settings->Add(new ItemHeader(c->T("Invert Axes")));
|
||||
settings->Add(new CheckBox(&g_Config.bInvertTiltX, c->T("Invert Tilt along X axis")));
|
||||
settings->Add(new CheckBox(&g_Config.bInvertTiltY, c->T("Invert Tilt along Y axis")));
|
||||
settings->Add(new ItemHeader(co->T("Invert Axes")));
|
||||
settings->Add(new CheckBox(&g_Config.bInvertTiltX, co->T("Invert Tilt along X axis")));
|
||||
settings->Add(new CheckBox(&g_Config.bInvertTiltY, co->T("Invert Tilt along Y axis")));
|
||||
|
||||
settings->Add(new ItemHeader(c->T("Sensitivity")));
|
||||
settings->Add(new ItemHeader(co->T("Sensitivity")));
|
||||
//TODO: allow values greater than 100? I'm not sure if that's needed.
|
||||
settings->Add(new PopupSliderChoice(&g_Config.iTiltSensitivityX, 0, 100, c->T("Tilt Sensitivity along X axis"), screenManager()));
|
||||
settings->Add(new PopupSliderChoice(&g_Config.iTiltSensitivityY, 0, 100, c->T("Tilt Sensitivity along Y axis"), screenManager()));
|
||||
settings->Add(new PopupSliderChoiceFloat(&g_Config.fDeadzoneRadius, 0.0, 1.0, c->T("Deadzone Radius"), screenManager()));
|
||||
settings->Add(new PopupSliderChoice(&g_Config.iTiltSensitivityX, 0, 100, co->T("Tilt Sensitivity along X axis"), screenManager()));
|
||||
settings->Add(new PopupSliderChoice(&g_Config.iTiltSensitivityY, 0, 100, co->T("Tilt Sensitivity along Y axis"), screenManager()));
|
||||
settings->Add(new PopupSliderChoiceFloat(&g_Config.fDeadzoneRadius, 0.0, 1.0, co->T("Deadzone Radius"), screenManager()));
|
||||
|
||||
settings->Add(new ItemHeader(c->T("Calibration")));
|
||||
InfoItem *calibrationInfo = new InfoItem(c->T("To Calibrate", "To calibrate, keep device on a flat surface and press calibrate."), "");
|
||||
settings->Add(new ItemHeader(co->T("Calibration")));
|
||||
InfoItem *calibrationInfo = new InfoItem(co->T("To Calibrate", "To calibrate, keep device on a flat surface and press calibrate."), "");
|
||||
settings->Add(calibrationInfo);
|
||||
|
||||
Choice *calibrate = new Choice(c->T("Calibrate D-Pad"));
|
||||
Choice *calibrate = new Choice(co->T("Calibrate D-Pad"));
|
||||
calibrate->OnClick.Handle(this, &TiltAnalogSettingsScreen::OnCalibrate);
|
||||
settings->Add(calibrate);
|
||||
|
||||
root_->Add(settings);
|
||||
settings->Add(new ItemHeader(""));
|
||||
settings->Add(new Choice(d->T("Back")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
settings->Add(new Choice(di->T("Back")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
}
|
||||
|
||||
void TiltAnalogSettingsScreen::update(InputState &input) {
|
||||
|
@ -310,20 +310,20 @@ void TouchControlLayoutScreen::CreateViews() {
|
||||
|
||||
using namespace UI;
|
||||
|
||||
I18NCategory *c = GetI18NCategory("Controls");
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
I18NCategory *co = GetI18NCategory("Controls");
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
|
||||
root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
|
||||
Choice *reset = new Choice(d->T("Reset"), "", false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 84));
|
||||
Choice *back = new Choice(d->T("Back"), "", false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 10));
|
||||
Choice *visibility = new Choice(c->T("Visibility"), "", false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 158));
|
||||
// controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fButtonScale, 0.80, 2.0, c->T("Button Scaling"), screenManager()))
|
||||
Choice *reset = new Choice(di->T("Reset"), "", false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 84));
|
||||
Choice *back = new Choice(di->T("Back"), "", false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 10));
|
||||
Choice *visibility = new Choice(co->T("Visibility"), "", false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 158));
|
||||
// controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fButtonScale, 0.80, 2.0, co->T("Button Scaling"), screenManager()))
|
||||
// ->OnChange.Handle(this, &GameSettingsScreen::OnChangeControlScaling);
|
||||
|
||||
mode_ = new ChoiceStrip(ORIENT_VERTICAL, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 158 + 64 + 10));
|
||||
mode_->AddChoice(d->T("Move"));
|
||||
mode_->AddChoice(d->T("Resize"));
|
||||
mode_->AddChoice(di->T("Move"));
|
||||
mode_->AddChoice(di->T("Resize"));
|
||||
mode_->SetSelection(0);
|
||||
|
||||
reset->OnClick.Handle(this, &TouchControlLayoutScreen::OnReset);
|
||||
|
@ -216,12 +216,12 @@ namespace MainWindow
|
||||
}
|
||||
|
||||
static void ShowScreenResolution() {
|
||||
I18NCategory *g = GetI18NCategory("Graphics");
|
||||
I18NCategory *gr = GetI18NCategory("Graphics");
|
||||
|
||||
std::ostringstream messageStream;
|
||||
messageStream << g->T("Internal Resolution") << ": ";
|
||||
messageStream << gr->T("Internal Resolution") << ": ";
|
||||
messageStream << PSP_CoreParameter().renderWidth << "x" << PSP_CoreParameter().renderHeight << " ";
|
||||
messageStream << g->T("Window Size") << ": ";
|
||||
messageStream << gr->T("Window Size") << ": ";
|
||||
messageStream << PSP_CoreParameter().pixelWidth << "x" << PSP_CoreParameter().pixelHeight;
|
||||
|
||||
osm.Show(messageStream.str(), 2.0f);
|
||||
@ -745,24 +745,24 @@ namespace MainWindow
|
||||
g_Config.iRenderingMode = FB_NON_BUFFERED_MODE;
|
||||
}
|
||||
|
||||
I18NCategory *g = GetI18NCategory("Graphics");
|
||||
I18NCategory *gr = GetI18NCategory("Graphics");
|
||||
|
||||
switch(g_Config.iRenderingMode) {
|
||||
case FB_NON_BUFFERED_MODE:
|
||||
osm.Show(g->T("Non-Buffered Rendering"));
|
||||
osm.Show(gr->T("Non-Buffered Rendering"));
|
||||
g_Config.bAutoFrameSkip = false;
|
||||
break;
|
||||
|
||||
case FB_BUFFERED_MODE:
|
||||
osm.Show(g->T("Buffered Rendering"));
|
||||
osm.Show(gr->T("Buffered Rendering"));
|
||||
break;
|
||||
|
||||
case FB_READFBOMEMORY_CPU:
|
||||
osm.Show(g->T("Read Framebuffers To Memory (CPU)"));
|
||||
osm.Show(gr->T("Read Framebuffers To Memory (CPU)"));
|
||||
break;
|
||||
|
||||
case FB_READFBOMEMORY_GPU:
|
||||
osm.Show(g->T("Read Framebuffers To Memory (GPU)"));
|
||||
osm.Show(gr->T("Read Framebuffers To Memory (GPU)"));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -781,13 +781,13 @@ namespace MainWindow
|
||||
g_Config.iFrameSkip = FRAMESKIP_OFF;
|
||||
}
|
||||
|
||||
I18NCategory *g = GetI18NCategory("Graphics");
|
||||
I18NCategory *gr = GetI18NCategory("Graphics");
|
||||
|
||||
std::ostringstream messageStream;
|
||||
messageStream << g->T("Frame Skipping") << ":" << " ";
|
||||
messageStream << gr->T("Frame Skipping") << ":" << " ";
|
||||
|
||||
if (g_Config.iFrameSkip == FRAMESKIP_OFF)
|
||||
messageStream << g->T("Off");
|
||||
messageStream << gr->T("Off");
|
||||
else
|
||||
messageStream << g_Config.iFrameSkip;
|
||||
|
||||
@ -1201,7 +1201,7 @@ namespace MainWindow
|
||||
{
|
||||
if (!EmuThread_Ready())
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
I18NCategory *g = GetI18NCategory("Graphics");
|
||||
I18NCategory *gr = GetI18NCategory("Graphics");
|
||||
|
||||
wmId = LOWORD(wParam);
|
||||
wmEvent = HIWORD(wParam);
|
||||
@ -1266,7 +1266,7 @@ namespace MainWindow
|
||||
|
||||
case ID_EMULATION_CHEATS:
|
||||
g_Config.bEnableCheats = !g_Config.bEnableCheats;
|
||||
osm.ShowOnOff(g->T("Cheats"), g_Config.bEnableCheats);
|
||||
osm.ShowOnOff(gr->T("Cheats"), g_Config.bEnableCheats);
|
||||
break;
|
||||
|
||||
case ID_FILE_LOADSTATEFILE:
|
||||
@ -1424,7 +1424,7 @@ namespace MainWindow
|
||||
|
||||
case ID_OPTIONS_HARDWARETRANSFORM:
|
||||
g_Config.bHardwareTransform = !g_Config.bHardwareTransform;
|
||||
osm.ShowOnOff(g->T("Hardware Transform"), g_Config.bHardwareTransform);
|
||||
osm.ShowOnOff(gr->T("Hardware Transform"), g_Config.bHardwareTransform);
|
||||
break;
|
||||
|
||||
case ID_OPTIONS_STRETCHDISPLAY:
|
||||
|
Loading…
Reference in New Issue
Block a user