cleanups
This commit is contained in:
@@ -83,7 +83,7 @@ static const char *EditStateNames[] = {
|
||||
"RecordPaused",
|
||||
"Playing"
|
||||
};
|
||||
XToString( EditState, NUM_EDIT_STATES );
|
||||
XToString( EditState, NUM_EditState );
|
||||
|
||||
#if defined(XBOX)
|
||||
void ScreenEdit::InitEditMappings()
|
||||
@@ -708,7 +708,7 @@ void ScreenEdit::Init()
|
||||
m_NoteFieldRecord.Load( &m_NoteDataRecord, -(int)SCREEN_HEIGHT/2, (int)SCREEN_HEIGHT/2 );
|
||||
this->AddChild( &m_NoteFieldRecord );
|
||||
|
||||
m_EditState = STATE_INVALID;
|
||||
m_EditState = EditState_Invalid;
|
||||
TransitionEditState( STATE_EDITING );
|
||||
|
||||
m_bRemoveNoteButtonDown = false;
|
||||
|
||||
@@ -26,8 +26,8 @@ enum EditState
|
||||
STATE_RECORDING,
|
||||
STATE_RECORDING_PAUSED,
|
||||
STATE_PLAYING,
|
||||
NUM_EDIT_STATES,
|
||||
STATE_INVALID
|
||||
NUM_EditState,
|
||||
EditState_Invalid
|
||||
};
|
||||
|
||||
enum EditButton
|
||||
|
||||
@@ -25,7 +25,7 @@ static const char *PageTypeNames[] = {
|
||||
"SurvivalCourses",
|
||||
"AllCourses",
|
||||
};
|
||||
XToString( PageType, NUM_PAGE_TYPES );
|
||||
XToString( PageType, NUM_PageType );
|
||||
StringToX( PageType );
|
||||
|
||||
#define TYPE THEME->GetMetric(m_sName,"Type")
|
||||
|
||||
@@ -28,9 +28,10 @@ enum PageType
|
||||
PageType_OniCourses,
|
||||
PageType_SurvivalCourses,
|
||||
PageType_AllCourses,
|
||||
NUM_PAGE_TYPES
|
||||
NUM_PageType,
|
||||
PageType_Invalid
|
||||
};
|
||||
#define FOREACH_PageType( pt ) FOREACH_ENUM( PageType, NUM_PAGE_TYPES, pt )
|
||||
#define FOREACH_PageType( pt ) FOREACH_ENUM( PageType, NUM_PageType, pt )
|
||||
const RString& PageTypeToString( PageType pt );
|
||||
PageType StringToPageType( const RString& s );
|
||||
|
||||
|
||||
@@ -19,15 +19,15 @@ static const char *SetTimeSelectionNames[] = {
|
||||
"Minute",
|
||||
"Second",
|
||||
};
|
||||
XToString( SetTimeSelection, NUM_SET_TIME_SELECTIONS );
|
||||
#define FOREACH_SetTimeSelection( s ) FOREACH_ENUM( SetTimeSelection, NUM_SET_TIME_SELECTIONS, s )
|
||||
XToString( SetTimeSelection, NUM_SetTimeSelection );
|
||||
#define FOREACH_SetTimeSelection( s ) FOREACH_ENUM( SetTimeSelection, NUM_SetTimeSelection, s )
|
||||
|
||||
const float g_X[NUM_SET_TIME_SELECTIONS] =
|
||||
const float g_X[NUM_SetTimeSelection] =
|
||||
{
|
||||
320, 320, 320, 320, 320, 320
|
||||
};
|
||||
|
||||
const float g_Y[NUM_SET_TIME_SELECTIONS] =
|
||||
const float g_Y[NUM_SetTimeSelection] =
|
||||
{
|
||||
140, 180, 220, 260, 300, 340
|
||||
};
|
||||
@@ -148,7 +148,7 @@ void ScreenSetTime::ChangeSelection( int iDirection )
|
||||
SetTimeSelection OldSelection = m_Selection;
|
||||
enum_add<SetTimeSelection>( m_Selection, iDirection );
|
||||
|
||||
CLAMP( (int&)m_Selection, 0, NUM_SET_TIME_SELECTIONS-1 );
|
||||
CLAMP( (int&)m_Selection, 0, NUM_SetTimeSelection-1 );
|
||||
if( iDirection != 0 && m_Selection == OldSelection )
|
||||
return; // can't move any more
|
||||
|
||||
@@ -189,7 +189,7 @@ void ScreenSetTime::MenuStart( const InputEventPlus &input )
|
||||
|
||||
if( bHoldingLeftAndRight )
|
||||
ChangeSelection( -1 );
|
||||
else if( m_Selection == NUM_SET_TIME_SELECTIONS -1 ) // last row
|
||||
else if( m_Selection == NUM_SetTimeSelection -1 ) // last row
|
||||
{
|
||||
/* Save the new time. */
|
||||
time_t iNow = time(NULL);
|
||||
|
||||
@@ -12,7 +12,8 @@ enum SetTimeSelection
|
||||
hour,
|
||||
minute,
|
||||
second,
|
||||
NUM_SET_TIME_SELECTIONS
|
||||
NUM_SetTimeSelection,
|
||||
SetTimeSelection_Invalid
|
||||
};
|
||||
|
||||
class ScreenSetTime : public ScreenWithMenuElements
|
||||
@@ -37,8 +38,8 @@ private:
|
||||
void ChangeSelection( int iDirection );
|
||||
void ChangeValue( int iDirection );
|
||||
|
||||
BitmapText m_textTitle[NUM_SET_TIME_SELECTIONS];
|
||||
BitmapText m_textValue[NUM_SET_TIME_SELECTIONS];
|
||||
BitmapText m_textTitle[NUM_SetTimeSelection];
|
||||
BitmapText m_textValue[NUM_SetTimeSelection];
|
||||
BitmapText m_textDayOfWeek;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user