fixup
This commit is contained in:
@@ -1184,29 +1184,32 @@ void ScreenOptions::AfterChangeRow( PlayerNumber pn )
|
|||||||
//
|
//
|
||||||
// In FIVE_KEY, keep the selection in the row near the focus.
|
// In FIVE_KEY, keep the selection in the row near the focus.
|
||||||
//
|
//
|
||||||
OptionRow &row = *m_pRows[r];
|
const int iRow = m_iCurrentRow[pn];
|
||||||
switch( m_OptionsNavigation )
|
if( iRow != -1 )
|
||||||
{
|
{
|
||||||
case NAV_TOGGLE_FIVE_KEY:
|
OptionRow &row = *m_pRows[iRow];
|
||||||
if( row.GetRowDef().m_layoutType != LAYOUT_SHOW_ONE_IN_ROW )
|
switch( m_OptionsNavigation )
|
||||||
{
|
{
|
||||||
int iSelectionDist = -1;
|
case NAV_TOGGLE_FIVE_KEY:
|
||||||
for( unsigned i = 0; i < row.GetTextItemsSize(); ++i )
|
if( row.GetRowDef().m_layoutType != LAYOUT_SHOW_ONE_IN_ROW )
|
||||||
{
|
{
|
||||||
int iWidth, iX, iY;
|
int iSelectionDist = -1;
|
||||||
GetWidthXY( pn, m_iCurrentRow[pn], i, iWidth, iX, iY );
|
for( unsigned i = 0; i < row.GetTextItemsSize(); ++i )
|
||||||
const int iDist = abs( iX-m_iFocusX[pn] );
|
|
||||||
if( iSelectionDist == -1 || iDist < iSelectionDist )
|
|
||||||
{
|
{
|
||||||
iSelectionDist = iDist;
|
int iWidth, iX, iY;
|
||||||
row.SetChoiceInRowWithFocus( pn, i );
|
GetWidthXY( pn, m_iCurrentRow[pn], i, iWidth, iX, iY );
|
||||||
|
const int iDist = abs( iX-m_iFocusX[pn] );
|
||||||
|
if( iSelectionDist == -1 || iDist < iSelectionDist )
|
||||||
|
{
|
||||||
|
iSelectionDist = iDist;
|
||||||
|
row.SetChoiceInRowWithFocus( pn, i );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
AfterChangeValueOrRow( pn );
|
AfterChangeValueOrRow( pn );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user