fix underlines showing in ScreenOptionsMenu

This commit is contained in:
Chris Danford
2005-01-31 03:32:59 +00:00
parent a24bd3014c
commit bab89e1b07
4 changed files with 15 additions and 4 deletions
+1 -1
View File
@@ -3424,7 +3424,7 @@ PrevScreen=ScreenTitleBranch
# exit the screen when in regular mode is "exit". # exit the screen when in regular mode is "exit".
LineNames=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 LineNames=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
OptionMenuFlags=together;forceallplayers;smnavigation OptionMenuFlags=together;forceallplayers;smnavigation;hideunderlines
# This NextScreen is only used for the "exit" choice. # This NextScreen is only used for the "exit" choice.
Line1=list,Appearance Options Line1=list,Appearance Options
Line2=list,Background Options Line2=list,Background Options
+7 -1
View File
@@ -122,6 +122,8 @@ ScreenOptions::ScreenOptions( CString sClassName ) : ScreenWithMenuElements(sCla
m_bGotAtLeastOneStartPressed[p] = false; m_bGotAtLeastOneStartPressed[p] = false;
} }
m_bShowUnderlines = true;
m_framePage.RunCommands( FRAME_ON_COMMAND ); m_framePage.RunCommands( FRAME_ON_COMMAND );
} }
@@ -130,12 +132,14 @@ void ScreenOptions::LoadOptionIcon( PlayerNumber pn, int iRow, CString sText )
m_Rows[iRow]->m_OptionIcons[pn].Load( pn, sText, false ); m_Rows[iRow]->m_OptionIcons[pn].Load( pn, sText, false );
} }
void ScreenOptions::InitMenu( InputMode im, OptionRowData OptionRows[], int iNumOptionLines ) void ScreenOptions::InitMenu( InputMode im, OptionRowData OptionRows[], int iNumOptionLines, bool bShowUnderlines )
{ {
LOG->Trace( "ScreenOptions::Set()" ); LOG->Trace( "ScreenOptions::Set()" );
m_InputMode = im; m_InputMode = im;
m_bShowUnderlines = bShowUnderlines;
for( int r=0; r<iNumOptionLines; r++ ) // foreach row for( int r=0; r<iNumOptionLines; r++ ) // foreach row
{ {
m_Rows.push_back( new Row() ); m_Rows.push_back( new Row() );
@@ -646,6 +650,8 @@ void ScreenOptions::PositionUnderlines()
bool bSelected = row.m_vbSelected[p][ iChoiceWithFocus ]; bool bSelected = row.m_vbSelected[p][ iChoiceWithFocus ];
bool bHidden = !bSelected || row.m_bHidden; bool bHidden = !bSelected || row.m_bHidden;
if( !m_bShowUnderlines )
bHidden = true;
if( ul.GetDestY() != row.m_fY ) if( ul.GetDestY() != row.m_fY )
{ {
+3 -1
View File
@@ -42,7 +42,7 @@ class ScreenOptions : public ScreenWithMenuElements
{ {
public: public:
ScreenOptions( CString sClassName ); ScreenOptions( CString sClassName );
void InitMenu( InputMode im, OptionRowData OptionRowData[], int iNumOptionLines ); void InitMenu( InputMode im, OptionRowData OptionRowData[], int iNumOptionLines, bool bShowUnderlines = true );
virtual ~ScreenOptions(); virtual ~ScreenOptions();
virtual void Update( float fDeltaTime ); virtual void Update( float fDeltaTime );
virtual void DrawPrimitives(); virtual void DrawPrimitives();
@@ -163,6 +163,8 @@ protected:
// show if the current selections will disqualify a high score // show if the current selections will disqualify a high score
AutoActor m_sprDisqualify[NUM_PLAYERS]; AutoActor m_sprDisqualify[NUM_PLAYERS];
bool m_bShowUnderlines;
// TRICKY: People hold Start to get to PlayerOptions, then // TRICKY: People hold Start to get to PlayerOptions, then
// the repeat events cause them to zip to the bottom. So, ignore // the repeat events cause them to zip to the bottom. So, ignore
// Start repeat events until we've seen one first pressed event. // Start repeat events until we've seen one first pressed event.
+4 -1
View File
@@ -306,6 +306,7 @@ ScreenOptionsMaster::ScreenOptionsMaster( CString sClassName ):
split( OPTION_MENU_FLAGS, ";", Flags, true ); split( OPTION_MENU_FLAGS, ";", Flags, true );
InputMode im = INPUTMODE_INDIVIDUAL; InputMode im = INPUTMODE_INDIVIDUAL;
bool Explanations = false; bool Explanations = false;
bool bShowUnderlines = true;
for( unsigned i = 0; i < Flags.size(); ++i ) for( unsigned i = 0; i < Flags.size(); ++i )
{ {
@@ -325,6 +326,8 @@ ScreenOptionsMaster::ScreenOptionsMaster( CString sClassName ):
SetNavigation( NAV_THREE_KEY_MENU ); SetNavigation( NAV_THREE_KEY_MENU );
if( Flags[i] == "toggle" || Flags[i] == "firstchoicegoesdown" ) if( Flags[i] == "toggle" || Flags[i] == "firstchoicegoesdown" )
SetNavigation( PREFSMAN->m_bArcadeOptionsNavigation? NAV_TOGGLE_THREE_KEY:NAV_TOGGLE_FIVE_KEY ); SetNavigation( PREFSMAN->m_bArcadeOptionsNavigation? NAV_TOGGLE_THREE_KEY:NAV_TOGGLE_FIVE_KEY );
if( Flags[i] == "hideunderlines" )
bShowUnderlines = false;
} }
m_OptionRowAlloc = new OptionRowData[asLineNames.size()]; m_OptionRowAlloc = new OptionRowData[asLineNames.size()];
@@ -376,7 +379,7 @@ ScreenOptionsMaster::ScreenOptionsMaster( CString sClassName ):
ASSERT( OptionRowHandlers.size() == asLineNames.size() ); ASSERT( OptionRowHandlers.size() == asLineNames.size() );
InitMenu( im, m_OptionRowAlloc, asLineNames.size() ); InitMenu( im, m_OptionRowAlloc, asLineNames.size(), bShowUnderlines );
} }
ScreenOptionsMaster::~ScreenOptionsMaster() ScreenOptionsMaster::~ScreenOptionsMaster()