added MAX-style options navigation and moved more constants into theme metrics
This commit is contained in:
+175
-85
@@ -22,18 +22,25 @@
|
||||
|
||||
|
||||
#define ICONS_X( p ) THEME->GetMetricF("ScreenOptions",ssprintf("IconsP%dX",p+1))
|
||||
#define ARROWS_X THEME->GetMetricF("ScreenOptions","ArrowsX")
|
||||
#define LABELS_X THEME->GetMetricF("ScreenOptions","LabelsX")
|
||||
#define LABELS_ZOOM THEME->GetMetricF("ScreenOptions","LabelsZoom")
|
||||
#define LABELS_H_ALIGN THEME->GetMetricI("ScreenOptions","LabelsHAlign")
|
||||
#define ITEMS_ZOOM THEME->GetMetricF("ScreenOptions","ItemsZoom")
|
||||
#define ITEMS_START_X THEME->GetMetricF("ScreenOptions","ItemsStartX")
|
||||
#define ITEMS_GAP_X THEME->GetMetricF("ScreenOptions","ItemsGapX")
|
||||
#define ITEMS_START_Y THEME->GetMetricF("ScreenOptions","ItemsStartY")
|
||||
#define ITEMS_SPACING_Y THEME->GetMetricF("ScreenOptions","ItemsSpacingY")
|
||||
#define HELP_TEXT THEME->GetMetric("ScreenOptions","HelpText")
|
||||
#define TIMER_SECONDS THEME->GetMetricI("ScreenOptions","TimerSeconds")
|
||||
#define COLOR_SELECTED THEME->GetMetricC("ScreenOptions","ColorSelected")
|
||||
#define COLOR_NOT_SELECTED THEME->GetMetricC("ScreenOptions","ColorNotSelected")
|
||||
|
||||
|
||||
const ScreenMessage SM_PlaySample = ScreenMessage(SM_User-4);
|
||||
const ScreenMessage SM_GoToPrevScreen = ScreenMessage(SM_User-5);
|
||||
const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User-6);
|
||||
const ScreenMessage SM_TweenOffScreen = ScreenMessage(SM_User-7);
|
||||
|
||||
|
||||
ScreenOptions::ScreenOptions( CString sBackgroundPath, CString sPagePath, CString sTopEdgePath )
|
||||
@@ -41,8 +48,9 @@ ScreenOptions::ScreenOptions( CString sBackgroundPath, CString sPagePath, CStrin
|
||||
LOG->Trace( "ScreenOptions::ScreenOptions()" );
|
||||
|
||||
m_SoundChangeCol.Load( THEME->GetPathTo("Sounds","option change col") );
|
||||
m_SoundChangeRow.Load( THEME->GetPathTo("Sounds","option change row") );
|
||||
m_SoundNext.Load( THEME->GetPathTo("Sounds","menu start") );
|
||||
m_SoundNextRow.Load( THEME->GetPathTo("Sounds","option next row") );
|
||||
m_SoundPrevRow.Load( THEME->GetPathTo("Sounds","option prev row") );
|
||||
m_SoundStart.Load( THEME->GetPathTo("Sounds","menu start") );
|
||||
|
||||
m_Menu.Load(
|
||||
sBackgroundPath,
|
||||
@@ -77,14 +85,14 @@ ScreenOptions::ScreenOptions( CString sBackgroundPath, CString sPagePath, CStrin
|
||||
ZeroMemory(&m_OptionDim, sizeof(m_OptionDim));
|
||||
}
|
||||
|
||||
void ScreenOptions::Init( InputMode im, OptionLineData optionLineData[], int iNumOptionLines, bool bUseIcons )
|
||||
void ScreenOptions::Init( InputMode im, OptionRowData OptionRowData[], int iNumOptionLines, bool bUseIcons )
|
||||
{
|
||||
LOG->Trace( "ScreenOptions::Set()" );
|
||||
|
||||
|
||||
m_InputMode = im;
|
||||
m_OptionLineData = optionLineData;
|
||||
m_iNumOptionLines = iNumOptionLines;
|
||||
m_OptionRowData = OptionRowData;
|
||||
m_iNumOptionRows = iNumOptionLines;
|
||||
m_bUseIcons = bUseIcons;
|
||||
|
||||
|
||||
@@ -101,7 +109,7 @@ void ScreenOptions::Init( InputMode im, OptionLineData optionLineData[], int iNu
|
||||
if( !GAMESTATE->IsPlayerEnabled(p) )
|
||||
continue; // skip
|
||||
|
||||
for( int l=0; l<m_iNumOptionLines; l++ )
|
||||
for( int l=0; l<m_iNumOptionRows; l++ )
|
||||
{
|
||||
m_Underline[p][l].Load( (PlayerNumber)p, true );
|
||||
m_framePage.AddChild( &m_Underline[p][l] );
|
||||
@@ -116,24 +124,26 @@ void ScreenOptions::Init( InputMode im, OptionLineData optionLineData[], int iNu
|
||||
}
|
||||
|
||||
// init text
|
||||
for( int i=0; i<m_iNumOptionLines; i++ ) // foreach line
|
||||
for( int i=0; i<m_iNumOptionRows; i++ ) // foreach line
|
||||
{
|
||||
m_framePage.AddChild( &m_textOptionLineTitles[i] );
|
||||
m_framePage.AddChild( &m_sprLineArrows[i] );
|
||||
|
||||
for( int j=0; j<m_OptionLineData[i].iNumOptions; j++ )
|
||||
{
|
||||
m_textOptions[i][j].SetZ( -1 );
|
||||
m_framePage.AddChild( &m_textOptionLineTitles[i] );
|
||||
|
||||
for( int j=0; j<m_OptionRowData[i].iNumOptions; j++ )
|
||||
m_framePage.AddChild( &m_textOptions[i][j] ); // this array has to be big enough to hold all of the options
|
||||
}
|
||||
}
|
||||
|
||||
// TRICKY: Add one more item. This will be "EXIT"
|
||||
m_framePage.AddChild( &m_textOptions[i][0] );
|
||||
|
||||
|
||||
InitOptionsText();
|
||||
PositionUnderlines();
|
||||
PositionIcons();
|
||||
RefreshIcons();
|
||||
PositionHighlights();
|
||||
PositionCursors();
|
||||
UpdateEnabledDisabled();
|
||||
}
|
||||
|
||||
ScreenOptions::~ScreenOptions()
|
||||
@@ -143,9 +153,9 @@ ScreenOptions::~ScreenOptions()
|
||||
}
|
||||
|
||||
|
||||
void ScreenOptions::GetWidthXY( PlayerNumber p, int iRow, int &iWidthOut, int &iXOut, int &iYOut )
|
||||
void ScreenOptions::GetWidthXY( PlayerNumber pn, int iRow, int &iWidthOut, int &iXOut, int &iYOut )
|
||||
{
|
||||
int iOptionInRow = m_iSelectedOption[p][iRow];
|
||||
int iOptionInRow = m_iSelectedOption[pn][iRow];
|
||||
BitmapText &option = m_textOptions[iRow][iOptionInRow];
|
||||
|
||||
iWidthOut = roundf( option.GetWidestLineWidthInSourcePixels() * option.GetZoomX() );
|
||||
@@ -155,36 +165,42 @@ void ScreenOptions::GetWidthXY( PlayerNumber p, int iRow, int &iWidthOut, int &i
|
||||
|
||||
void ScreenOptions::InitOptionsText()
|
||||
{
|
||||
const float fLineGap = ITEMS_SPACING_Y - max(0, (m_iNumOptionLines-10)*2);
|
||||
const float fLineGap = ITEMS_SPACING_Y - max(0, (m_iNumOptionRows-10)*2);
|
||||
|
||||
// init m_textOptions from optionLines
|
||||
for( int i=0; i<m_iNumOptionLines; i++ ) // foreach options line
|
||||
for( int i=0; i<m_iNumOptionRows; i++ ) // foreach options line
|
||||
{
|
||||
OptionLineData &optline = m_OptionLineData[i];
|
||||
OptionRowData &optline = m_OptionRowData[i];
|
||||
|
||||
float fY = ITEMS_START_Y + fLineGap*i;
|
||||
|
||||
BitmapText &title = m_textOptionLineTitles[i];
|
||||
|
||||
title.LoadFromFont( THEME->GetPathTo("Fonts","Header2") );
|
||||
title.LoadFromFont( THEME->GetPathTo("Fonts","option title") );
|
||||
CString sText = optline.szTitle;
|
||||
sText.Replace( " ", "\n" );
|
||||
title.SetText( sText );
|
||||
title.SetXY( LABELS_X, fY );
|
||||
title.SetZoom( 0.7f );
|
||||
title.SetZoom( LABELS_ZOOM );
|
||||
title.SetHorizAlign( (Actor::HorizAlign)LABELS_H_ALIGN );
|
||||
title.SetVertAlign( Actor::align_middle );
|
||||
title.TurnShadowOff();
|
||||
|
||||
|
||||
Sprite &arrow = m_sprLineArrows[i];
|
||||
arrow.Load( THEME->GetPathTo("Graphics","options arrow") );
|
||||
arrow.SetXY( ARROWS_X, fY );
|
||||
|
||||
|
||||
// init all text in this line and count the width of the line
|
||||
float fX = ITEMS_START_X; // indent 70 pixels
|
||||
for( int j=0; j<optline.iNumOptions; j++ ) // for each option on this line
|
||||
{
|
||||
BitmapText &option = m_textOptions[i][j];
|
||||
|
||||
option.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
||||
option.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
option.LoadFromFont( THEME->GetPathTo("Fonts","option item") );
|
||||
option.SetText( optline.szOptionsText[j] );
|
||||
option.SetZoom( 0.5f );
|
||||
option.SetZoom( ITEMS_ZOOM );
|
||||
option.SetShadowLength( 2 );
|
||||
|
||||
// set the XY position of each item in the line
|
||||
@@ -194,6 +210,14 @@ void ScreenOptions::InitOptionsText()
|
||||
fX += fItemWidth/2 + ITEMS_GAP_X;
|
||||
}
|
||||
}
|
||||
|
||||
BitmapText &option = m_textOptions[i][0];
|
||||
option.LoadFromFont( THEME->GetPathTo("Fonts","option item") );
|
||||
option.SetText( "EXIT" );
|
||||
option.SetZoom( ITEMS_ZOOM );
|
||||
option.SetShadowLength( 2 );
|
||||
float fY = ITEMS_START_Y + fLineGap*i;
|
||||
option.SetXY( CENTER_X, fY );
|
||||
}
|
||||
|
||||
void ScreenOptions::DimOption(int line, int option, bool dim)
|
||||
@@ -221,7 +245,7 @@ void ScreenOptions::DimOption(int line, int option, bool dim)
|
||||
|
||||
bool ScreenOptions::RowCompletelyDimmed(int line) const
|
||||
{
|
||||
for(int i = 0; i < m_OptionLineData[line].iNumOptions; ++i)
|
||||
for(int i = 0; i < m_OptionRowData[line].iNumOptions; ++i)
|
||||
if(!m_OptionDim[line][i]) return false;
|
||||
return true;
|
||||
}
|
||||
@@ -231,7 +255,7 @@ void ScreenOptions::PositionUnderlines()
|
||||
// Set the position of the underscores showing the current choice for each option line.
|
||||
for( int p=0; p<NUM_PLAYERS; p++ ) // foreach player
|
||||
{
|
||||
for( int i=0; i<m_iNumOptionLines; i++ ) // foreach options line
|
||||
for( int i=0; i<m_iNumOptionRows; i++ ) // foreach options line
|
||||
{
|
||||
// Quad &underline = m_OptionUnderline[p][i];
|
||||
OptionsCursor &underline = m_Underline[p][i];
|
||||
@@ -250,7 +274,7 @@ void ScreenOptions::PositionIcons()
|
||||
// Set the position of the underscores showing the current choice for each option line.
|
||||
for( int p=0; p<NUM_PLAYERS; p++ ) // foreach player
|
||||
{
|
||||
for( int i=0; i<m_iNumOptionLines; i++ ) // foreach options line
|
||||
for( int i=0; i<m_iNumOptionRows; i++ ) // foreach options line
|
||||
{
|
||||
OptionIcon &icon = m_OptionIcons[p][i];
|
||||
|
||||
@@ -266,19 +290,21 @@ void ScreenOptions::RefreshIcons()
|
||||
// Set the position of the underscores showing the current choice for each option line.
|
||||
for( int p=0; p<NUM_PLAYERS; p++ ) // foreach player
|
||||
{
|
||||
for( int i=0; i<m_iNumOptionLines; i++ ) // foreach options line
|
||||
for( int i=0; i<m_iNumOptionRows; i++ ) // foreach options line
|
||||
{
|
||||
OptionIcon &icon = m_OptionIcons[p][i];
|
||||
|
||||
int iSelection = m_iSelectedOption[p][i];
|
||||
CString sSelection = m_OptionLineData[i].szOptionsText[iSelection];
|
||||
CString sSelection = m_OptionRowData[i].szOptionsText[iSelection];
|
||||
if( sSelection == "ON" )
|
||||
sSelection = m_OptionRowData[i].szTitle;
|
||||
icon.Load( (PlayerNumber)p, m_bUseIcons ? sSelection : "", false );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ScreenOptions::PositionHighlights()
|
||||
void ScreenOptions::PositionCursors()
|
||||
{
|
||||
// Set the position of the highlight showing the current option the user is changing.
|
||||
// Set the position of the underscores showing the current choice for each option line.
|
||||
@@ -295,7 +321,7 @@ void ScreenOptions::PositionHighlights()
|
||||
}
|
||||
}
|
||||
|
||||
void ScreenOptions::TweenHighlight( PlayerNumber player_no )
|
||||
void ScreenOptions::TweenCursor( PlayerNumber player_no )
|
||||
{
|
||||
// Set the position of the highlight showing the current option the user is changing.
|
||||
int iCurRow = m_iCurrentRow[player_no];
|
||||
@@ -310,6 +336,38 @@ void ScreenOptions::TweenHighlight( PlayerNumber player_no )
|
||||
highlight.SetTweenXY( (float)iX, (float)iY );
|
||||
}
|
||||
|
||||
void ScreenOptions::UpdateEnabledDisabled()
|
||||
{
|
||||
D3DXCOLOR colorSelected = COLOR_SELECTED;
|
||||
D3DXCOLOR colorNotSelected = COLOR_NOT_SELECTED;
|
||||
|
||||
// init text
|
||||
for( int i=0; i<m_iNumOptionRows; i++ ) // foreach line
|
||||
{
|
||||
bool bThisRowIsSelected = false;
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
if( GAMESTATE->IsPlayerEnabled(p) && m_iCurrentRow[p] == i )
|
||||
bThisRowIsSelected = true;
|
||||
|
||||
m_sprLineArrows[i].SetDiffuse( bThisRowIsSelected ? colorSelected : colorNotSelected );
|
||||
|
||||
m_textOptionLineTitles[i].SetDiffuse( bThisRowIsSelected ? colorSelected : colorNotSelected );
|
||||
|
||||
for( int j=0; j<m_OptionRowData[i].iNumOptions; j++ )
|
||||
m_textOptions[i][j].SetDiffuse( bThisRowIsSelected ? colorSelected : colorNotSelected );
|
||||
}
|
||||
|
||||
bool bThisRowIsSelected = false;
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
if( GAMESTATE->IsPlayerEnabled(p) && m_iCurrentRow[p] == i )
|
||||
bThisRowIsSelected = true;
|
||||
m_textOptions[i][0].SetDiffuse( bThisRowIsSelected ? colorSelected : colorNotSelected );
|
||||
if( bThisRowIsSelected )
|
||||
m_textOptions[i][0].SetEffectCamelion( 2.5, colorSelected, colorNotSelected );
|
||||
else
|
||||
m_textOptions[i][0].SetEffectNone();
|
||||
}
|
||||
|
||||
void ScreenOptions::Update( float fDeltaTime )
|
||||
{
|
||||
//LOG->Trace( "ScreenOptions::Update(%f)", fDeltaTime );
|
||||
@@ -338,7 +396,7 @@ void ScreenOptions::HandleScreenMessage( const ScreenMessage SM )
|
||||
switch( SM )
|
||||
{
|
||||
case SM_MenuTimer:
|
||||
this->MenuStart(PLAYER_1);
|
||||
this->SendScreenMessage( SM_TweenOffScreen, 0 );
|
||||
break;
|
||||
case SM_GoToPrevScreen:
|
||||
this->ExportOptions();
|
||||
@@ -348,6 +406,15 @@ void ScreenOptions::HandleScreenMessage( const ScreenMessage SM )
|
||||
this->ExportOptions();
|
||||
this->GoToNextState();
|
||||
break;
|
||||
case SM_TweenOffScreen:
|
||||
m_Menu.TweenOffScreenToBlack( SM_None, false );
|
||||
|
||||
m_SoundStart.Play();
|
||||
m_Wipe.CloseWipingRight( SM_GoToNextScreen );
|
||||
|
||||
m_framePage.BeginTweening( 0.3f, Actor::TWEEN_BIAS_END );
|
||||
m_framePage.SetTweenX( SCREEN_RIGHT );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,12 +423,13 @@ void ScreenOptions::OnChange()
|
||||
{
|
||||
PositionUnderlines();
|
||||
RefreshIcons();
|
||||
UpdateEnabledDisabled();
|
||||
}
|
||||
|
||||
|
||||
void ScreenOptions::MenuBack( PlayerNumber p )
|
||||
void ScreenOptions::MenuBack( PlayerNumber pn )
|
||||
{
|
||||
Screen::MenuBack( p );
|
||||
Screen::MenuBack( pn );
|
||||
|
||||
m_Menu.TweenOffScreenToBlack( SM_None, true );
|
||||
|
||||
@@ -369,17 +437,12 @@ void ScreenOptions::MenuBack( PlayerNumber p )
|
||||
}
|
||||
|
||||
|
||||
void ScreenOptions::MenuStart( PlayerNumber p )
|
||||
void ScreenOptions::MenuStart( PlayerNumber pn )
|
||||
{
|
||||
Screen::MenuStart( p );
|
||||
|
||||
m_Menu.TweenOffScreenToBlack( SM_None, false );
|
||||
|
||||
m_SoundNext.PlayRandom();
|
||||
m_Wipe.CloseWipingRight( SM_GoToNextScreen );
|
||||
|
||||
m_framePage.BeginTweening( 0.3f, Actor::TWEEN_BIAS_END );
|
||||
m_framePage.SetTweenX( SCREEN_RIGHT );
|
||||
if( m_iCurrentRow[pn] == m_iNumOptionRows ) // not on exit
|
||||
this->SendScreenMessage( SM_TweenOffScreen, 0 );
|
||||
else
|
||||
MenuDown( pn ); // can't go down any more
|
||||
}
|
||||
|
||||
void ScreenOptions::MenuLeft( PlayerNumber pn )
|
||||
@@ -391,19 +454,25 @@ void ScreenOptions::MenuLeft( PlayerNumber pn )
|
||||
|
||||
int iCurRow = m_iCurrentRow[p];
|
||||
|
||||
int new_opt = m_iSelectedOption[p][iCurRow];
|
||||
do {
|
||||
new_opt--;
|
||||
} while(new_opt >= 0 && m_OptionDim[iCurRow][new_opt]);
|
||||
|
||||
if( new_opt < 0 ) // can't go left any more
|
||||
return;
|
||||
if( iCurRow == m_iNumOptionRows ) // EXIT is selected
|
||||
return; // don't allow a move
|
||||
|
||||
m_iSelectedOption[p][iCurRow] = new_opt;
|
||||
const int iNumOptions = m_OptionRowData[iCurRow].iNumOptions;
|
||||
m_iSelectedOption[p][iCurRow] = (m_iSelectedOption[p][iCurRow]-1+iNumOptions) % iNumOptions;
|
||||
// Chris: I commented this out because it made wrapping a pain. Is it used anyway? If so, please
|
||||
// let me know and I'll fix it.
|
||||
// do {
|
||||
// new_opt--;
|
||||
// } while(new_opt >= 0 && m_OptionDim[iCurRow][new_opt]);
|
||||
//
|
||||
// if( new_opt < 0 ) // can't go left any more
|
||||
// return;
|
||||
//
|
||||
// m_iSelectedOption[p][iCurRow] = new_opt;
|
||||
|
||||
TweenHighlight( (PlayerNumber)p );
|
||||
TweenCursor( (PlayerNumber)p );
|
||||
}
|
||||
m_SoundChangeCol.PlayRandom();
|
||||
m_SoundChangeCol.Play();
|
||||
OnChange();
|
||||
}
|
||||
|
||||
@@ -415,20 +484,28 @@ void ScreenOptions::MenuRight( PlayerNumber pn )
|
||||
continue; // skip
|
||||
|
||||
int iCurRow = m_iCurrentRow[p];
|
||||
int new_opt = m_iSelectedOption[p][iCurRow];
|
||||
do {
|
||||
new_opt++;
|
||||
} while(new_opt < m_OptionLineData[iCurRow].iNumOptions &&
|
||||
m_OptionDim[iCurRow][new_opt]);
|
||||
|
||||
if( iCurRow == m_iNumOptionRows ) // EXIT is selected
|
||||
return; // don't allow a move
|
||||
|
||||
const int iNumOptions = m_OptionRowData[iCurRow].iNumOptions;
|
||||
m_iSelectedOption[p][iCurRow] = (m_iSelectedOption[p][iCurRow]+1) % iNumOptions;
|
||||
// Chris: I commented this out because it made wrapping a pain. Is it used anyway? If so, please
|
||||
// let me know and I'll fix it.
|
||||
// int new_opt = m_iSelectedOption[p][iCurRow];
|
||||
// do {
|
||||
// new_opt++;
|
||||
// } while(new_opt < m_OptionRowData[iCurRow].iNumOptions &&
|
||||
// m_OptionDim[iCurRow][new_opt]);
|
||||
//
|
||||
// if( new_opt == m_OptionRowData[iCurRow].iNumOptions ) // can't go right any more
|
||||
// return;
|
||||
//
|
||||
// m_iSelectedOption[p][iCurRow] = new_opt;
|
||||
|
||||
if( new_opt == m_OptionLineData[iCurRow].iNumOptions ) // can't go right any more
|
||||
return;
|
||||
|
||||
m_iSelectedOption[p][iCurRow] = new_opt;
|
||||
|
||||
TweenHighlight( (PlayerNumber)p );
|
||||
TweenCursor( (PlayerNumber)p );
|
||||
}
|
||||
m_SoundChangeCol.PlayRandom();
|
||||
m_SoundChangeCol.Play();
|
||||
OnChange();
|
||||
}
|
||||
|
||||
@@ -439,18 +516,25 @@ void ScreenOptions::MenuUp( PlayerNumber pn )
|
||||
if( m_InputMode == INPUTMODE_PLAYERS && p != pn )
|
||||
continue; // skip
|
||||
|
||||
/* Find the prev row with any un-dimmed entries. */
|
||||
int new_row = m_iCurrentRow[p];
|
||||
do {
|
||||
if(--new_row < 0)
|
||||
new_row = m_iNumOptionLines-1; // wrap around
|
||||
if(!RowCompletelyDimmed(new_row)) break;
|
||||
} while(new_row != m_iCurrentRow[p]);
|
||||
m_iCurrentRow[p] = new_row;
|
||||
if( m_iCurrentRow[p] == 0 ) // on first row
|
||||
return; // can't go up any more
|
||||
|
||||
TweenHighlight( (PlayerNumber)p );
|
||||
m_iCurrentRow[p]--;
|
||||
|
||||
|
||||
// Chris: Will add back in later
|
||||
// /* Find the prev row with any un-dimmed entries. */
|
||||
// int new_row = m_iCurrentRow[p];
|
||||
// do {
|
||||
/// if(--new_row < 0)
|
||||
// new_row = m_iNumOptionRows-1; // wrap around
|
||||
// if(!RowCompletelyDimmed(new_row)) break;
|
||||
// } while(new_row != m_iCurrentRow[p]);
|
||||
// m_iCurrentRow[p] = new_row;
|
||||
|
||||
TweenCursor( (PlayerNumber)p );
|
||||
}
|
||||
m_SoundChangeRow.PlayRandom();
|
||||
m_SoundPrevRow.Play();
|
||||
OnChange();
|
||||
}
|
||||
|
||||
@@ -462,18 +546,24 @@ void ScreenOptions::MenuDown( PlayerNumber pn )
|
||||
if( m_InputMode == INPUTMODE_PLAYERS && p != pn )
|
||||
continue; // skip
|
||||
|
||||
/* Find the next row with any un-dimmed entries. */
|
||||
int new_row = m_iCurrentRow[p];
|
||||
do {
|
||||
if( ++new_row == m_iNumOptionLines )
|
||||
new_row = 0; // wrap around
|
||||
if(!RowCompletelyDimmed(new_row)) break;
|
||||
} while(new_row != m_iCurrentRow[p]);
|
||||
m_iCurrentRow[p] = new_row;
|
||||
if( m_iCurrentRow[p] == m_iNumOptionRows ) // on exit
|
||||
return; // can't go down any more
|
||||
|
||||
TweenHighlight( (PlayerNumber)p );
|
||||
m_iCurrentRow[p]++;
|
||||
|
||||
// Chris: Commented this out, but will add back in later.
|
||||
// /* Find the next row with any un-dimmed entries. */
|
||||
// int new_row = m_iCurrentRow[p];
|
||||
// do {
|
||||
// if( ++new_row == m_iNumOptionRows )
|
||||
// new_row = 0; // wrap around
|
||||
// if(!RowCompletelyDimmed(new_row)) break;
|
||||
// } while(new_row != m_iCurrentRow[p]);
|
||||
// m_iCurrentRow[p] = new_row;
|
||||
|
||||
TweenCursor( (PlayerNumber)p );
|
||||
}
|
||||
m_SoundChangeRow.PlayRandom();
|
||||
m_SoundNextRow.Play();
|
||||
OnChange();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user