From 22b24af7ea3b17c0636574b27eecadf3af2786f1 Mon Sep 17 00:00:00 2001 From: raven02 Date: Tue, 16 Apr 2013 19:20:42 +0800 Subject: [PATCH 1/5] Cosmetic : YesNo Dialog --- Core/Dialog/PSPMsgDialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Dialog/PSPMsgDialog.cpp b/Core/Dialog/PSPMsgDialog.cpp index 6ccf85e0bb..3b97a1458f 100644 --- a/Core/Dialog/PSPMsgDialog.cpp +++ b/Core/Dialog/PSPMsgDialog.cpp @@ -136,8 +136,8 @@ void PSPMsgDialog::DisplayBack() void PSPMsgDialog::DisplayYesNo() { - PPGeDrawText("Yes", 200, 150, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(yesnoChoice == 1?0xFF0000FF:0xFFFFFFFF)); - PPGeDrawText("No", 320, 150, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(yesnoChoice == 0?0xFF0000FF:0xFFFFFFFF)); + PPGeDrawText("Yes", 200, 170, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(yesnoChoice == 1?0xFF0000FF:0xFFFFFFFF)); + PPGeDrawText("No", 320, 170, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(yesnoChoice == 0?0xFF0000FF:0xFFFFFFFF)); if (IsButtonPressed(CTRL_LEFT) && yesnoChoice == 0) { From acdee3dbfd9909283d9aefe1113e1f34a120cdd8 Mon Sep 17 00:00:00 2001 From: raven02 Date: Tue, 16 Apr 2013 19:21:47 +0800 Subject: [PATCH 2/5] Cosmetic : message Dialog --- Core/Dialog/PSPDialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Core/Dialog/PSPDialog.cpp b/Core/Dialog/PSPDialog.cpp index efa83a454f..3a07e43b39 100644 --- a/Core/Dialog/PSPDialog.cpp +++ b/Core/Dialog/PSPDialog.cpp @@ -53,7 +53,9 @@ void PSPDialog::EndDraw() void PSPDialog::DisplayMessage(std::string text) { - PPGeDrawText(text.c_str(), 40, 30, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); + PPGeDrawRect(30, 50, 450, 51, CalcFadedColor(0xFFFFFFFF)); + PPGeDrawText(text.c_str(), 40, 60, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); + PPGeDrawRect(30, 200, 450, 201, CalcFadedColor(0xFFFFFFFF)); } int PSPDialog::Shutdown() From 39a13b16cbf7d05da69c8a1fc6d92e317c562b3b Mon Sep 17 00:00:00 2001 From: raven02 Date: Tue, 16 Apr 2013 20:47:46 +0800 Subject: [PATCH 3/5] combine PPGeDrawRect() --- Core/Dialog/PSPDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Dialog/PSPDialog.cpp b/Core/Dialog/PSPDialog.cpp index 3a07e43b39..a77f0987ec 100644 --- a/Core/Dialog/PSPDialog.cpp +++ b/Core/Dialog/PSPDialog.cpp @@ -54,8 +54,8 @@ void PSPDialog::EndDraw() void PSPDialog::DisplayMessage(std::string text) { PPGeDrawRect(30, 50, 450, 51, CalcFadedColor(0xFFFFFFFF)); - PPGeDrawText(text.c_str(), 40, 60, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); PPGeDrawRect(30, 200, 450, 201, CalcFadedColor(0xFFFFFFFF)); + PPGeDrawText(text.c_str(), 40, 60, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); } int PSPDialog::Shutdown() From eff7ad25311582dba780a6da94a2b1aba034b295 Mon Sep 17 00:00:00 2001 From: raven02 Date: Tue, 16 Apr 2013 20:52:35 +0800 Subject: [PATCH 4/5] Combine PPGeDrawImage() and PPGeDrawText() --- Core/Dialog/PSPOskDialog.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Core/Dialog/PSPOskDialog.cpp b/Core/Dialog/PSPOskDialog.cpp index 816e281867..60e6a6e62a 100644 --- a/Core/Dialog/PSPOskDialog.cpp +++ b/Core/Dialog/PSPOskDialog.cpp @@ -172,16 +172,14 @@ int PSPOskDialog::Update() StartDraw(); RenderKeyboard(); PPGeDrawImage(I_CROSS, 30, 220, 20, 20, 0, CalcFadedColor(0xFFFFFFFF)); - PPGeDrawText("Select", 60, 220, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); - PPGeDrawImage(I_CIRCLE, 130, 220, 20, 20, 0, CalcFadedColor(0xFFFFFFFF)); - PPGeDrawText("Delete", 160, 220, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); - PPGeDrawImage(I_BUTTON, 230, 220, 50, 20, 0, CalcFadedColor(0xFFFFFFFF)); + PPGeDrawImage(I_BUTTON, 350, 220, 55, 20, 0, CalcFadedColor(0xFFFFFFFF)); + + PPGeDrawText("Select", 60, 220, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); + PPGeDrawText("Delete", 160, 220, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); PPGeDrawText("Start", 245, 220, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); PPGeDrawText("Finish", 290, 220, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); - - PPGeDrawImage(I_BUTTON, 350, 220, 55, 20, 0, CalcFadedColor(0xFFFFFFFF)); PPGeDrawText("Select", 365, 220, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); PPGeDrawText("Caps", 410, 220, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); From 250a714e2b3ac980964578e12a831bcabc202504 Mon Sep 17 00:00:00 2001 From: raven02 Date: Tue, 16 Apr 2013 20:55:27 +0800 Subject: [PATCH 5/5] combine PPGeDrawRect()/PPGeDrawImage() --- Core/Dialog/PSPSaveDialog.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Core/Dialog/PSPSaveDialog.cpp b/Core/Dialog/PSPSaveDialog.cpp index 4dc09cc390..838e94e177 100644 --- a/Core/Dialog/PSPSaveDialog.cpp +++ b/Core/Dialog/PSPSaveDialog.cpp @@ -286,12 +286,13 @@ void PSPSaveDialog::DisplaySaveDataInfo1() PPGeDrawRect(180, 139, 980, 140, CalcFadedColor(0xFFFFFFFF)); std::string titleTxt = title; - PPGeDrawText(titleTxt.c_str(), 180, 120, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFC0C0C0)); std::string timeTxt = time; - PPGeDrawText(timeTxt.c_str(), 180, 141, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(0xFFFFFFFF)); std::string saveTitleTxt = saveTitle; - PPGeDrawText(saveTitleTxt.c_str(), 175, 163, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(0xFFFFFFFF)); std::string saveDetailTxt = saveDetail; + + PPGeDrawText(titleTxt.c_str(), 180, 120, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFC0C0C0)); + PPGeDrawText(timeTxt.c_str(), 180, 141, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(0xFFFFFFFF)); + PPGeDrawText(saveTitleTxt.c_str(), 175, 163, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(0xFFFFFFFF)); PPGeDrawText(saveDetailTxt.c_str(), 175, 185, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(0xFFFFFFFF)); } } @@ -333,10 +334,10 @@ void PSPSaveDialog::DisplaySaveDataInfo2() void PSPSaveDialog::DisplayConfirmationYesNo(std::string text) { 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("Yes", 250, 140, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(yesnoChoice == 1?0xFF0000FF:0xFFFFFFFF)); PPGeDrawText("No", 350, 140, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(yesnoChoice == 0?0xFF0000FF:0xFFFFFFFF)); - PPGeDrawRect(180, 160, 460, 161, CalcFadedColor(0xFFFFFFFF)); if (IsButtonPressed(CTRL_LEFT) && yesnoChoice == 0) { yesnoChoice = 1; @@ -350,8 +351,8 @@ void PSPSaveDialog::DisplayConfirmationYesNo(std::string text) void PSPSaveDialog::DisplayInfo(std::string text) { PPGeDrawRect(180, 105, 460, 106, CalcFadedColor(0xFFFFFFFF)); - PPGeDrawText(text.c_str(), 270, 110, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(0xFFFFFFFF)); PPGeDrawRect(180, 130, 460, 131, CalcFadedColor(0xFFFFFFFF)); + PPGeDrawText(text.c_str(), 270, 110, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(0xFFFFFFFF)); } void PSPSaveDialog::DisplayTitle(std::string name) { @@ -360,8 +361,8 @@ void PSPSaveDialog::DisplayTitle(std::string name) void PSPSaveDialog::DisplayEnterBack() { PPGeDrawImage(okButtonImg, 180, 257, 11, 11, 0, CalcFadedColor(0xFFFFFFFF)); - PPGeDrawText("Enter", 195, 255, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(0xFFFFFFFF)); PPGeDrawImage(cancelButtonImg, 270, 257, 11, 11, 0, CalcFadedColor(0xFFFFFFFF)); + PPGeDrawText("Enter", 195, 255, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(0xFFFFFFFF)); PPGeDrawText("Back", 285, 255, PPGE_ALIGN_LEFT, 0.45f, CalcFadedColor(0xFFFFFFFF)); } void PSPSaveDialog::DisplayBack()