mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-13 14:30:27 +02:00
Merge pull request #2523 from raven02/patch-20
Match font size of save dialog with real PSP and fix the wrong color of Yes/No button
This commit is contained in:
commit
cff69a336f
2 files changed
+12
-12
No files matched your search
@@ -21,7 +21,7 @@
|
||||
#include "i18n/i18n.h"
|
||||
|
||||
#define FADE_TIME 0.5
|
||||
const float FONT_SCALE = 0.65f;
|
||||
const float FONT_SCALE = 0.55f;
|
||||
|
||||
PSPDialog::PSPDialog() : status(SCE_UTILITY_STATUS_SHUTDOWN)
|
||||
, lastButtons(0)
|
||||
@@ -141,12 +141,12 @@ void PSPDialog::DisplayButtons(int flags)
|
||||
if (flags & DS_BUTTON_OK) {
|
||||
PPGeDrawImage(okButtonImg, x2, 258, 11.5f, 11.5f, 0, CalcFadedColor(0x80000000));
|
||||
PPGeDrawImage(okButtonImg, x2, 256, 11.5f, 11.5f, 0, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(d->T("Enter"), x2 + 15.5f, 252, PPGE_ALIGN_LEFT, FONT_SCALE, CalcFadedColor(0x80000000));
|
||||
PPGeDrawText(d->T("Enter"), x2 + 14.5f, 250, PPGE_ALIGN_LEFT, FONT_SCALE, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(d->T("Enter"), x2 + 15.5f, 254, PPGE_ALIGN_LEFT, FONT_SCALE, CalcFadedColor(0x80000000));
|
||||
PPGeDrawText(d->T("Enter"), x2 + 14.5f, 252, PPGE_ALIGN_LEFT, FONT_SCALE, CalcFadedColor(0xFFFFFFFF));
|
||||
}
|
||||
if (flags & DS_BUTTON_CANCEL) {
|
||||
PPGeDrawText(d->T("Back"), x1 + 15.5f, 252, PPGE_ALIGN_LEFT, FONT_SCALE, CalcFadedColor(0x80000000));
|
||||
PPGeDrawText(d->T("Back"), x1 + 14.5f, 250, PPGE_ALIGN_LEFT, FONT_SCALE, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(d->T("Back"), x1 + 15.5f, 254, PPGE_ALIGN_LEFT, FONT_SCALE, CalcFadedColor(0x80000000));
|
||||
PPGeDrawText(d->T("Back"), x1 + 14.5f, 252, PPGE_ALIGN_LEFT, FONT_SCALE, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawImage(cancelButtonImg, x1, 258, 11.5f, 11.5f, 0, CalcFadedColor(0x80000000));
|
||||
PPGeDrawImage(cancelButtonImg, x1, 256, 11.5f, 11.5f, 0, CalcFadedColor(0xFFFFFFFF));
|
||||
}
|
||||
|
||||
@@ -402,9 +402,9 @@ void PSPSaveDialog::DisplaySaveDataInfo1()
|
||||
std::string saveDetailTxt = saveDetail;
|
||||
|
||||
PPGeDrawText(titleTxt.c_str(), 180, 136, PPGE_ALIGN_BOTTOM, 0.6f, CalcFadedColor(0xFFC0C0C0));
|
||||
PPGeDrawText(timeTxt.c_str(), 180, 137, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(saveTitleTxt.c_str(), 175, 159, PPGE_ALIGN_LEFT, FONT_SCALE, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(saveDetailTxt.c_str(), 175, 181, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(timeTxt.c_str(), 180, 137, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(saveTitleTxt.c_str(), 175, 159, PPGE_ALIGN_LEFT, 0.55f, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(saveDetailTxt.c_str(), 175, 181, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -456,7 +456,7 @@ void PSPSaveDialog::DisplaySaveDataInfo2()
|
||||
}
|
||||
snprintf(txt, 1024, "%s\n%s %s\n%lld KB", saveTitle, date, hour_time, sizeK);
|
||||
std::string saveinfoTxt = txt;
|
||||
PPGeDrawText(saveinfoTxt.c_str(), 8, 200, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawText(saveinfoTxt.c_str(), 8, 200, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -476,14 +476,14 @@ void PSPSaveDialog::DisplayMessage(std::string text, bool hasYesNo)
|
||||
if (yesnoChoice == 1) {
|
||||
choiceText = d->T("Yes");
|
||||
x = 302.0f;
|
||||
yesColor = 0xFF0FFFFF;
|
||||
yesColor = 0xFFFFFFFF;
|
||||
noColor = 0xFFFFFFFF;
|
||||
}
|
||||
else {
|
||||
choiceText = d->T("No");
|
||||
x = 366.0f;
|
||||
yesColor = 0xFFFFFFFF;
|
||||
noColor = 0xFF0FFFFF;
|
||||
noColor = 0xFFFFFFFF;
|
||||
}
|
||||
PPGeMeasureText(&w, &h, 0, choiceText, FONT_SCALE);
|
||||
w = w / 2.0f + 5.5f;
|
||||
@@ -491,7 +491,7 @@ void PSPSaveDialog::DisplayMessage(std::string text, bool hasYesNo)
|
||||
float y2 = y + h2 + 4.0f;
|
||||
h2 += h + 4.0f;
|
||||
y = 132.0f - h;
|
||||
PPGeDrawRect(x - w, y2 - h, x + w, y2 + h, CalcFadedColor(0x6DCFCFCF));
|
||||
PPGeDrawRect(x - w, y2 - h, x + w, y2 + h, CalcFadedColor(0x20CFCFCF));
|
||||
PPGeDrawText(d->T("Yes"), 302.0f, y2, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(yesColor));
|
||||
PPGeDrawText(d->T("No"), 366.0f, y2, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(noColor));
|
||||
if (IsButtonPressed(CTRL_LEFT) && yesnoChoice == 0) {
|
||||
|
||||
Reference in new issue
Block a user