Created
December 9, 2012 01:02
-
-
Save dpasca/4242855 to your computer and use it in GitHub Desktop.
Some UI logic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// are we waiting for the introduction to go away ? | |
if ( mStater[STATE_IN_COMM_INTRODUCTION].IsActive() ) | |
{ | |
if NOT( moCharDlgWin->IsActive() ) // is finally the dialog gone ? | |
{ | |
mStater[STATE_IN_COMM_INTRODUCTION].Deactivate(); // the wait has ended | |
updateHomeButtonsState(); // set the fighters button on hover | |
} | |
} | |
else | |
if ( mStater[STATE_IN_COMM_GENERAL].IsActive() ) | |
{ | |
if NOT( moCharDlgWin->IsActive() ) // is finally the dialog gone ? | |
mStater[STATE_IN_COMM_GENERAL].Deactivate(); | |
} | |
// | |
if ( mPendingCredits.size() && !mWidgets["MSGBOX"].IsActive() ) | |
{ | |
if ( mStater[STATE_WAIT_TO_GIVE_CREDS].IsActive() ) | |
{ | |
} | |
else | |
if ( mStater[STATE_WAIT_TO_GIVE_CREDS].GetDoneState() ) | |
{ | |
prof.mCredits += mPendingCredits[0].creds; | |
mPendingCredits.erase( mPendingCredits.begin() + 0 ); | |
SUPERGAME->GetModProfiles()->Save(); | |
} | |
else | |
if NOT( mWidgets["CREDITS_DIALOG"].IsActive() ) | |
{ | |
((DUIUT::ConfirmDialog *)&mWidgets["CREDITS_DIALOG"])->SetMessage( mPendingCredits[0].msg.c_str() ); | |
mWidgets["CREDITS_DIALOG"].Activate( true ); | |
} | |
else | |
{ | |
if ( -1 != DUIUT::ConfirmDialog::AnimateChoice( &mWidgets["CREDITS_DIALOG"] ) ) | |
mStater[STATE_WAIT_TO_GIVE_CREDS].Activate(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment