From 1973ce72ba51c055f9354764342161d20962dffc Mon Sep 17 00:00:00 2001 From: ehouse Date: Mon, 21 Mar 2005 05:28:27 +0000 Subject: [PATCH] load and save remote/local field --- symbian/src/symgamdl.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/symbian/src/symgamdl.cpp b/symbian/src/symgamdl.cpp index 5da02d564..314a6fa35 100644 --- a/symbian/src/symgamdl.cpp +++ b/symbian/src/symgamdl.cpp @@ -45,6 +45,7 @@ TGameInfoBuf::TGameInfoBuf( const CurGameInfo* aGi, for ( i = 0; i < MAX_NUM_PLAYERS; ++i ) { iIsRobot[i] = aGi->players[i].isRobot; + iIsLocal[i] = aGi->players[i].isLocal; if ( aGi->players[i].name != NULL ) { XP_LOGF( "name[%d] = %s", i, aGi->players[i].name ); TBuf8<32> tmp( aGi->players[i].name ); @@ -78,6 +79,7 @@ TGameInfoBuf::CopyToL( MPFORMAL CurGameInfo* aGi TInt i; for ( i = 0; i < MAX_NUM_PLAYERS; ++i ) { aGi->players[i].isRobot = iIsRobot[i]; + aGi->players[i].isLocal = iIsLocal[i]; symReplaceStrIfDiff( MPPARM(mpool) &aGi->players[i].name, iPlayerNames[i] ); @@ -258,6 +260,7 @@ CXWGameInfoDlg::HandleControlStateChangeL( TInt aControlId ) list = static_cast (Control( ENPlayersWhichList )); SetPlayerShown( list->CurrentItem() ); + HandleControlStateChangeL( EPlayerLocationChoice ); break; case EPlayerLocationChoice: @@ -362,6 +365,15 @@ CXWGameInfoDlg::LoadPlayerInfo( TInt aWhich ) list->SetCurrentItem( newVal ); list->DrawDeferred(); } + + /* remoteness */ + list = static_cast(Control(EPlayerLocationChoice )); + oldVal = list->CurrentItem(); + newVal = iGib->iIsLocal[aWhich]? 0:1; + if ( oldVal != newVal ) { + list->SetCurrentItem( newVal ); + list->DrawDeferred(); + } #endif /* password */ @@ -380,6 +392,9 @@ CXWGameInfoDlg::SavePlayerInfo( TInt aWhich ) CEikChoiceList* list = static_cast (Control(EPlayerSpeciesChoice )); iGib->iIsRobot[aWhich] = (list->CurrentItem() == 1); + + list = static_cast(Control(EPlayerLocationChoice )); + iGib->iIsLocal[aWhich] = (list->CurrentItem() == 0); #endif }