Dialog: Update by button flag consistently.

Always check for the flag to change in Update().
This commit is contained in:
Unknown W. Brackets committed 2023-02-08 19:02:37 -08:00
1 parent 2d0252feb8
commit fcc1abc7c3
9 files changed
+34 -44

No files matched your search

+2 -12
View File
@@ -140,6 +140,7 @@ int PSPMsgDialog::Init(unsigned int paramAddr) {
ChangeStatusInit(MSG_INIT_DELAY_US);
UpdateButtons();
InitCommon();
StartFade(true);
return 0;
}
@@ -282,20 +283,9 @@ int PSPMsgDialog::Update(int animSpeed) {
ChangeStatus(SCE_UTILITY_STATUS_FINISHED, 0);
} else {
UpdateButtons();
UpdateCommon();
UpdateFade(animSpeed);
okButtonImg = ImageID("I_CIRCLE");
cancelButtonImg = ImageID("I_CROSS");
okButtonFlag = CTRL_CIRCLE;
cancelButtonFlag = CTRL_CROSS;
if (messageDialog.common.buttonSwap == 1)
{
okButtonImg = ImageID("I_CROSS");
cancelButtonImg = ImageID("I_CIRCLE");
okButtonFlag = CTRL_CROSS;
cancelButtonFlag = CTRL_CIRCLE;
}
StartDraw();
// white -> RGB(168,173,189), black -> RGB(129,134,150)
// (255 - a) + (x * a / 255) = 173, x * a / 255 = 134