Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Generals/Code/GameEngine/Include/GameNetwork/GUIUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ void ShowUnderlyingGUIElements( Bool show, const char *layoutFilename, const cha
void PopulateColorComboBox(Int comboBox, GameWindow *comboArray[], GameInfo *myGame, Bool isObserver = FALSE);
void PopulatePlayerTemplateComboBox(Int comboBox, GameWindow *comboArray[], GameInfo *myGame, Bool allowObservers );
void PopulateTeamComboBox(Int comboBox, GameWindow *comboArray[], GameInfo *myGame, Bool isObserver = FALSE);
void PopulateStartingCashComboBox(GameWindow *comboBox, GameInfo *myGame);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be here because we already merged code from Zero Hour to Generals. You can keep it.


void EnableSlotListUpdates( Bool val );
Bool AreSlotListUpdatesEnabled();
Expand Down
5 changes: 2 additions & 3 deletions GeneralsMD/Code/GameEngine/Source/GameNetwork/GUIUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,7 @@ void PopulateStartingCashComboBox(GameWindow *comboBox, GameInfo *myGame)
const MultiplayerStartingMoneyList & startingCashMap = TheMultiplayerSettings->getStartingMoneyList();
Int currentSelectionIndex = -1;

MultiplayerStartingMoneyList::const_iterator it = startingCashMap.begin();
for ( ; it != startingCashMap.end(); it++ )
for (MultiplayerStartingMoneyList::const_iterator it = startingCashMap.begin(); it != startingCashMap.end(); it++ )
{
Int newIndex = GadgetComboBoxAddEntry(comboBox, formatMoneyForStartingCashComboBox( *it ),
comboBox->winGetEnabled() ? comboBox->winGetEnabledTextColor() : comboBox->winGetDisabledTextColor());
Expand All @@ -352,7 +351,7 @@ void PopulateStartingCashComboBox(GameWindow *comboBox, GameInfo *myGame)
DEBUG_CRASH( ("Current selection for starting cash not found in list") );
currentSelectionIndex = GadgetComboBoxAddEntry(comboBox, formatMoneyForStartingCashComboBox( myGame->getStartingCash() ),
comboBox->winGetEnabled() ? comboBox->winGetEnabledTextColor() : comboBox->winGetDisabledTextColor());
GadgetComboBoxSetItemData(comboBox, currentSelectionIndex, (void *)it->countMoney() );
GadgetComboBoxSetItemData(comboBox, currentSelectionIndex, (void *)myGame->getStartingCash().countMoney() );
}

GadgetComboBoxSetSelectedPos(comboBox, currentSelectionIndex);
Expand Down
Loading