Try to make the password box more idiot proof.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11492 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 41b6578b911a263cf566ec9db42476215b2ccfe7)
master
Buginator 2010-08-17 23:27:14 +00:00 committed by buginator
parent ccd5555275
commit bc24cd6a22
1 changed files with 4 additions and 2 deletions

View File

@ -2305,15 +2305,17 @@ static void processMultiopWidgets(UDWORD id)
{
sstrcpy(game_password, widgGetString(psWScreen, MULTIOP_PASSWORD_EDIT));
NETsetGamePassword(game_password);
widgSetButtonState(psWScreen, MULTIOP_PASSWORD_BUT, WBUT_CLICKLOCK);
widgSetButtonState(psWScreen, MULTIOP_PASSWORD_BUT, WBUT_CLICKLOCK);
widgSetButtonState(psWScreen, MULTIOP_PASSWORD_EDIT, WEDBS_DISABLE);
// say password is now required to join games?
ssprintf(buf, _("*** password is now required! ***"));
ssprintf(buf, _("*** password [%s] is now required! ***"), NetPlay.gamePassword);
addConsoleMessage(buf, DEFAULT_JUSTIFY, NOTIFY_MESSAGE);
NETGameLocked(true);
}
else
{
widgSetButtonState(psWScreen, MULTIOP_PASSWORD_BUT , 0);
widgSetButtonState(psWScreen, MULTIOP_PASSWORD_EDIT, 0);
ssprintf(buf, _("*** password is NOT required! ***"));
addConsoleMessage(buf, DEFAULT_JUSTIFY, NOTIFY_MESSAGE);
NETresetGamePassword();