D for Dialog

This commit is contained in:
Yaroslav 2013-04-21 14:16:01 +07:00
parent 6ba02579d4
commit a0b722a9b6
3 changed files with 33 additions and 33 deletions

View File

@ -130,16 +130,16 @@ int PSPMsgDialog::Init(unsigned int paramAddr)
void PSPMsgDialog::DisplayBack()
{
I18NCategory *m = GetI18NCategory("Dialog");
I18NCategory *d = GetI18NCategory("Dialog");
PPGeDrawImage(cancelButtonImg, 290, 220, 20, 20, 0, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(m->T("Back"), 320, 220, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(d->T("Back"), 320, 220, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
}
void PSPMsgDialog::DisplayYesNo()
{
I18NCategory *m = GetI18NCategory("Dialog");
PPGeDrawText(m->T("Yes"), 200, 150, PPGE_ALIGN_LEFT, 0.55f, CalcFadedColor(yesnoChoice == 1?0xFF0000FF:0xFFFFFFFF));
PPGeDrawText(m->T("No"), 320, 150, PPGE_ALIGN_LEFT, 0.55f, CalcFadedColor(yesnoChoice == 0?0xFF0000FF:0xFFFFFFFF));
I18NCategory *d = GetI18NCategory("Dialog");
PPGeDrawText(d->T("Yes"), 200, 150, PPGE_ALIGN_LEFT, 0.55f, CalcFadedColor(yesnoChoice == 1?0xFF0000FF:0xFFFFFFFF));
PPGeDrawText(d->T("No"), 320, 150, PPGE_ALIGN_LEFT, 0.55f, CalcFadedColor(yesnoChoice == 0?0xFF0000FF:0xFFFFFFFF));
if (IsButtonPressed(CTRL_LEFT) && yesnoChoice == 0)
{
@ -153,9 +153,9 @@ void PSPMsgDialog::DisplayYesNo()
void PSPMsgDialog::DisplayOk()
{
I18NCategory *m = GetI18NCategory("Dialog");
I18NCategory *d = GetI18NCategory("Dialog");
PPGeDrawImage(okButtonImg, 200, 220, 20, 20, 0, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(m->T("Enter"), 230, 220, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(d->T("Enter"), 230, 220, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
}
int PSPMsgDialog::Update()

View File

@ -220,14 +220,14 @@ int PSPOskDialog::Update()
//PPGeDrawImage(I_BUTTON, 230, 220, 50, 20, 0, CalcFadedColor(0xFFFFFFFF));
//PPGeDrawImage(I_BUTTON, 350, 220, 55, 20, 0, CalcFadedColor(0xFFFFFFFF));
I18NCategory *m = GetI18NCategory("Dialog");
PPGeDrawText(m->T("Select"), 60, 220, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(m->T("Delete"), 180, 220, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
I18NCategory *d = GetI18NCategory("Dialog");
PPGeDrawText(d->T("Select"), 60, 220, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(d->T("Delete"), 180, 220, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText("Start", 245, 220, PPGE_ALIGN_LEFT, 0.6f, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(m->T("Finish"), 290, 222, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(d->T("Finish"), 290, 222, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText("Select", 365, 220, PPGE_ALIGN_LEFT, 0.6f, CalcFadedColor(0xFFFFFFFF));
// TODO: Show title of next keyboard?
PPGeDrawText(m->T("Shift"), 415, 222, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(d->T("Shift"), 415, 222, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
if (IsButtonPressed(CTRL_UP))
{

View File

@ -251,8 +251,8 @@ void PSPSaveDialog::DisplaySaveDataInfo1()
{
if(param.GetFileInfo(currentSelectedSave).size == 0)
{
I18NCategory *m = GetI18NCategory("Dialog");
PPGeDrawText(m->T("New Save"), 180, 100, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
I18NCategory *d = GetI18NCategory("Dialog");
PPGeDrawText(d->T("New Save"), 180, 100, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
}
else
{
@ -335,12 +335,12 @@ void PSPSaveDialog::DisplaySaveDataInfo2()
void PSPSaveDialog::DisplayConfirmationYesNo(std::string text)
{
I18NCategory *m = GetI18NCategory("Dialog");
I18NCategory *d = GetI18NCategory("Dialog");
PPGeDrawRect(180, 105, 460, 106, CalcFadedColor(0xFFFFFFFF));
PPGeDrawRect(180, 160, 460, 161, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(text.c_str(), 220, 110, PPGE_ALIGN_LEFT, 0.45f, 0xFFFFFFFF);
PPGeDrawText(m->T("Yes"), 250, 140, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(yesnoChoice == 1?0xFF0000FF:0xFFFFFFFF));
PPGeDrawText(m->T("No"), 350, 140, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(yesnoChoice == 0?0xFF0000FF:0xFFFFFFFF));
PPGeDrawText(d->T("Yes"), 250, 140, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(yesnoChoice == 1?0xFF0000FF:0xFFFFFFFF));
PPGeDrawText(d->T("No"), 350, 140, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(yesnoChoice == 0?0xFF0000FF:0xFFFFFFFF));
if (IsButtonPressed(CTRL_LEFT) && yesnoChoice == 0)
{
yesnoChoice = 1;
@ -363,17 +363,17 @@ void PSPSaveDialog::DisplayTitle(std::string name)
}
void PSPSaveDialog::DisplayEnterBack()
{
I18NCategory *m = GetI18NCategory("Dialog");
I18NCategory *d = GetI18NCategory("Dialog");
PPGeDrawImage(okButtonImg, 180, 257, 11, 11, 0, CalcFadedColor(0xFFFFFFFF));
PPGeDrawImage(cancelButtonImg, 270, 257, 11, 11, 0, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(m->T("Enter"), 195, 255, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(m->T("Back"), 285, 255, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(d->T("Enter"), 195, 255, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(d->T("Back"), 285, 255, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(0xFFFFFFFF));
}
void PSPSaveDialog::DisplayBack()
{
I18NCategory *m = GetI18NCategory("Dialog");
I18NCategory *d = GetI18NCategory("Dialog");
PPGeDrawImage(cancelButtonImg, 180, 257, 11, 11, 0, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(m->T("Back"), 195, 255, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(d->T("Back"), 195, 255, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(0xFFFFFFFF));
}
int PSPSaveDialog::Update()
@ -411,7 +411,7 @@ int PSPSaveDialog::Update()
cancelButtonFlag = CTRL_CIRCLE;
}
I18NCategory *m = GetI18NCategory("Dialog");
I18NCategory *d = GetI18NCategory("Dialog");
switch(display)
{
@ -459,7 +459,7 @@ int PSPSaveDialog::Update()
DisplaySaveIcon();
DisplaySaveDataInfo2();
DisplayConfirmationYesNo(m->T("Do you want to overwrite the data?"));
DisplayConfirmationYesNo(d->T("Do you want to overwrite the data?"));
DisplayEnterBack();
if (IsButtonPressed(cancelButtonFlag))
@ -496,7 +496,7 @@ int PSPSaveDialog::Update()
DisplaySaveIcon();
DisplaySaveDataInfo2();
DisplayInfo(m->T("Saving\nPlease Wait..."));
DisplayInfo(d->T("Saving\nPlease Wait..."));
EndDraw();
break;
@ -508,7 +508,7 @@ int PSPSaveDialog::Update()
DisplaySaveDataInfo2();
DisplayBack();
DisplayInfo(m->T("Save completed"));
DisplayInfo(d->T("Save completed"));
if (IsButtonPressed(cancelButtonFlag))
{
@ -551,7 +551,7 @@ int PSPSaveDialog::Update()
DisplaySaveIcon();
DisplaySaveDataInfo2();
DisplayInfo(m->T("Loading\nPlease Wait..."));
DisplayInfo(d->T("Loading\nPlease Wait..."));
EndDraw();
break;
@ -563,7 +563,7 @@ int PSPSaveDialog::Update()
DisplaySaveDataInfo2();
DisplayBack();
DisplayInfo(m->T("Load completed"));
DisplayInfo(d->T("Load completed"));
if (IsButtonPressed(cancelButtonFlag))
{
@ -581,7 +581,7 @@ int PSPSaveDialog::Update()
DisplayBack();
DisplayInfo(m->T("There is no data"));
DisplayInfo(d->T("There is no data"));
if (IsButtonPressed(cancelButtonFlag))
{
@ -619,7 +619,7 @@ int PSPSaveDialog::Update()
DisplaySaveIcon();
DisplaySaveDataInfo2();
DisplayConfirmationYesNo(m->T("This save data will be deleted.\nAre you sure you want to continue?", " This save data will be deleted.\nAre you sure you want to continue?"));
DisplayConfirmationYesNo(d->T("This save data will be deleted.\nAre you sure you want to continue?", " This save data will be deleted.\nAre you sure you want to continue?"));
DisplayEnterBack();
@ -654,7 +654,7 @@ int PSPSaveDialog::Update()
StartDraw();
DisplayInfo(m->T("Deleting\nPlease Wait..."));
DisplayInfo(d->T("Deleting\nPlease Wait..."));
EndDraw();
break;
@ -664,7 +664,7 @@ int PSPSaveDialog::Update()
DisplayBack();
DisplayInfo(m->T("Delete completed"));
DisplayInfo(d->T("Delete completed"));
if (IsButtonPressed(cancelButtonFlag))
{
@ -682,7 +682,7 @@ int PSPSaveDialog::Update()
DisplayBack();
DisplayInfo(m->T("There is no data"));
DisplayInfo(d->T("There is no data"));
if (IsButtonPressed(cancelButtonFlag))
{