Ability to enable/disable scoreboard

This commit is contained in:
Josh Allen
2005-08-15 02:10:57 +00:00
parent 8fd9e8b673
commit 25020e01b3
4 changed files with 43 additions and 10 deletions
+22 -2
View File
@@ -15,6 +15,7 @@
enum {
PO_CONNECTION,
PO_SERVER,
PO_SCOREBOARD,
NUM_NETWORK_OPTIONS_LINES
};
@@ -23,9 +24,16 @@ enum {
NO_START_SERVER
};
enum
{
NO_SCOREBOARD_OFF=0,
NO_SCOREBOARD_ON
};
OptionRowDefinition g_NetworkOptionsLines[NUM_NETWORK_OPTIONS_LINES] = {
OptionRowDefinition( "Connection", true, "PRESS START" ),
OptionRowDefinition( "Server", true, "PRESS START" )
OptionRowDefinition( "Server", true, "PRESS START" ),
OptionRowDefinition( "Scoreboard", true, "PRESS START" )
};
AutoScreenMessage( SM_DoneConnecting )
@@ -54,6 +62,10 @@ void ScreenNetworkOptions::Init()
g_NetworkOptionsLines[PO_SERVER].m_vsChoices.clear();
g_NetworkOptionsLines[PO_SERVER].m_vsChoices.push_back("Stop");
g_NetworkOptionsLines[PO_SERVER].m_vsChoices.push_back("Start...");
g_NetworkOptionsLines[PO_SCOREBOARD].m_vsChoices.clear();
g_NetworkOptionsLines[PO_SCOREBOARD].m_vsChoices.push_back("Off");
g_NetworkOptionsLines[PO_SCOREBOARD].m_vsChoices.push_back("On");
//Enable all lines for all players
for ( unsigned int i = 0; i < NUM_NETWORK_OPTIONS_LINES; i++ )
@@ -65,6 +77,8 @@ void ScreenNetworkOptions::Init()
InitMenu( vDefs, vHands );
m_pRows[PO_SCOREBOARD]->SetOneSharedSelection(PREFSMAN->m_bEnableScoreboard);
SOUND->PlayMusic( THEME->GetPathS("ScreenMachineOptions","music") );
}
@@ -138,6 +152,12 @@ void ScreenNetworkOptions::MenuStart( PlayerNumber pn, const InputEventType type
break;
}
break;
case PO_SCOREBOARD:
if (m_pRows[PO_SCOREBOARD]->GetOneSharedSelection() == NO_SCOREBOARD_ON)
PREFSMAN->m_bEnableScoreboard.Set(true);
else
PREFSMAN->m_bEnableScoreboard.Set(false);
break;
default:
ScreenOptions::MenuStart( pn, type );
}
@@ -154,7 +174,7 @@ void ScreenNetworkOptions::UpdateConnectStatus( )
#endif
/*
* (c) 2004 Charles Lohr
* (c) 2004 Charles Lohr, Josh Allen
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a