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