fix underlines showing in ScreenOptionsMenu
This commit is contained in:
@@ -3424,7 +3424,7 @@ PrevScreen=ScreenTitleBranch
|
||||
# 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
|
||||
OptionMenuFlags=together;forceallplayers;smnavigation
|
||||
OptionMenuFlags=together;forceallplayers;smnavigation;hideunderlines
|
||||
# This NextScreen is only used for the "exit" choice.
|
||||
Line1=list,Appearance Options
|
||||
Line2=list,Background Options
|
||||
|
||||
@@ -122,6 +122,8 @@ ScreenOptions::ScreenOptions( CString sClassName ) : ScreenWithMenuElements(sCla
|
||||
m_bGotAtLeastOneStartPressed[p] = false;
|
||||
}
|
||||
|
||||
m_bShowUnderlines = true;
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
void ScreenOptions::InitMenu( InputMode im, OptionRowData OptionRows[], int iNumOptionLines )
|
||||
void ScreenOptions::InitMenu( InputMode im, OptionRowData OptionRows[], int iNumOptionLines, bool bShowUnderlines )
|
||||
{
|
||||
LOG->Trace( "ScreenOptions::Set()" );
|
||||
|
||||
m_InputMode = im;
|
||||
|
||||
m_bShowUnderlines = bShowUnderlines;
|
||||
|
||||
for( int r=0; r<iNumOptionLines; r++ ) // foreach row
|
||||
{
|
||||
m_Rows.push_back( new Row() );
|
||||
@@ -646,6 +650,8 @@ void ScreenOptions::PositionUnderlines()
|
||||
|
||||
bool bSelected = row.m_vbSelected[p][ iChoiceWithFocus ];
|
||||
bool bHidden = !bSelected || row.m_bHidden;
|
||||
if( !m_bShowUnderlines )
|
||||
bHidden = true;
|
||||
|
||||
if( ul.GetDestY() != row.m_fY )
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ class ScreenOptions : public ScreenWithMenuElements
|
||||
{
|
||||
public:
|
||||
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 void Update( float fDeltaTime );
|
||||
virtual void DrawPrimitives();
|
||||
@@ -162,6 +162,8 @@ protected:
|
||||
|
||||
// show if the current selections will disqualify a high score
|
||||
AutoActor m_sprDisqualify[NUM_PLAYERS];
|
||||
|
||||
bool m_bShowUnderlines;
|
||||
|
||||
// TRICKY: People hold Start to get to PlayerOptions, then
|
||||
// the repeat events cause them to zip to the bottom. So, ignore
|
||||
|
||||
@@ -306,6 +306,7 @@ ScreenOptionsMaster::ScreenOptionsMaster( CString sClassName ):
|
||||
split( OPTION_MENU_FLAGS, ";", Flags, true );
|
||||
InputMode im = INPUTMODE_INDIVIDUAL;
|
||||
bool Explanations = false;
|
||||
bool bShowUnderlines = true;
|
||||
|
||||
for( unsigned i = 0; i < Flags.size(); ++i )
|
||||
{
|
||||
@@ -325,6 +326,8 @@ ScreenOptionsMaster::ScreenOptionsMaster( CString sClassName ):
|
||||
SetNavigation( NAV_THREE_KEY_MENU );
|
||||
if( Flags[i] == "toggle" || Flags[i] == "firstchoicegoesdown" )
|
||||
SetNavigation( PREFSMAN->m_bArcadeOptionsNavigation? NAV_TOGGLE_THREE_KEY:NAV_TOGGLE_FIVE_KEY );
|
||||
if( Flags[i] == "hideunderlines" )
|
||||
bShowUnderlines = false;
|
||||
}
|
||||
|
||||
m_OptionRowAlloc = new OptionRowData[asLineNames.size()];
|
||||
@@ -376,7 +379,7 @@ ScreenOptionsMaster::ScreenOptionsMaster( CString sClassName ):
|
||||
|
||||
ASSERT( OptionRowHandlers.size() == asLineNames.size() );
|
||||
|
||||
InitMenu( im, m_OptionRowAlloc, asLineNames.size() );
|
||||
InitMenu( im, m_OptionRowAlloc, asLineNames.size(), bShowUnderlines );
|
||||
}
|
||||
|
||||
ScreenOptionsMaster::~ScreenOptionsMaster()
|
||||
|
||||
Reference in New Issue
Block a user