NUM_EditButton, EditButton_Invalid
This commit is contained in:
@@ -344,7 +344,7 @@ EditButton ScreenEdit::DeviceToEdit( const DeviceInput &DeviceI ) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return EDIT_BUTTON_INVALID;
|
return EditButton_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Given a DeviceInput that was just depressed, return an active edit function. */
|
/* Given a DeviceInput that was just depressed, return an active edit function. */
|
||||||
@@ -364,7 +364,7 @@ EditButton ScreenEdit::MenuButtonToEditButton( MenuButton MenuI ) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return EDIT_BUTTON_INVALID;
|
return EditButton_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If DeviceI was just pressed, return true if button is triggered. (More than one
|
/* If DeviceI was just pressed, return true if button is triggered. (More than one
|
||||||
@@ -1075,7 +1075,7 @@ void ScreenEdit::Input( const InputEventPlus &input )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
EditButton EditB = DeviceToEdit( input.DeviceI );
|
EditButton EditB = DeviceToEdit( input.DeviceI );
|
||||||
if( EditB == EDIT_BUTTON_INVALID )
|
if( EditB == EditButton_Invalid )
|
||||||
EditB = MenuButtonToEditButton( input.MenuI );
|
EditB = MenuButtonToEditButton( input.MenuI );
|
||||||
|
|
||||||
|
|
||||||
@@ -3539,18 +3539,18 @@ struct EditHelpLine
|
|||||||
EditHelpLine(
|
EditHelpLine(
|
||||||
const char *_szEnglishDescription,
|
const char *_szEnglishDescription,
|
||||||
EditButton eb0,
|
EditButton eb0,
|
||||||
EditButton eb1 = EDIT_BUTTON_INVALID,
|
EditButton eb1 = EditButton_Invalid,
|
||||||
EditButton eb2 = EDIT_BUTTON_INVALID,
|
EditButton eb2 = EditButton_Invalid,
|
||||||
EditButton eb3 = EDIT_BUTTON_INVALID,
|
EditButton eb3 = EditButton_Invalid,
|
||||||
EditButton eb4 = EDIT_BUTTON_INVALID,
|
EditButton eb4 = EditButton_Invalid,
|
||||||
EditButton eb5 = EDIT_BUTTON_INVALID,
|
EditButton eb5 = EditButton_Invalid,
|
||||||
EditButton eb6 = EDIT_BUTTON_INVALID,
|
EditButton eb6 = EditButton_Invalid,
|
||||||
EditButton eb7 = EDIT_BUTTON_INVALID,
|
EditButton eb7 = EditButton_Invalid,
|
||||||
EditButton eb8 = EDIT_BUTTON_INVALID,
|
EditButton eb8 = EditButton_Invalid,
|
||||||
EditButton eb9 = EDIT_BUTTON_INVALID )
|
EditButton eb9 = EditButton_Invalid )
|
||||||
{
|
{
|
||||||
szEnglishDescription = _szEnglishDescription;
|
szEnglishDescription = _szEnglishDescription;
|
||||||
#define PUSH_IF_VALID( x ) if( x != EDIT_BUTTON_INVALID ) veb.push_back( x );
|
#define PUSH_IF_VALID( x ) if( x != EditButton_Invalid ) veb.push_back( x );
|
||||||
PUSH_IF_VALID( eb0 );
|
PUSH_IF_VALID( eb0 );
|
||||||
PUSH_IF_VALID( eb1 );
|
PUSH_IF_VALID( eb1 );
|
||||||
PUSH_IF_VALID( eb2 );
|
PUSH_IF_VALID( eb2 );
|
||||||
|
|||||||
@@ -122,10 +122,10 @@ enum EditButton
|
|||||||
|
|
||||||
EDIT_BUTTON_SWITCH_PLAYERS,
|
EDIT_BUTTON_SWITCH_PLAYERS,
|
||||||
|
|
||||||
NUM_EDIT_BUTTONS, // leave this at the end
|
NUM_EditButton, // leave this at the end
|
||||||
EDIT_BUTTON_INVALID
|
EditButton_Invalid
|
||||||
};
|
};
|
||||||
#define FOREACH_EditButton( e ) FOREACH_ENUM( EditButton, NUM_EDIT_BUTTONS, e )
|
#define FOREACH_EditButton( e ) FOREACH_ENUM( EditButton, NUM_EditButton, e )
|
||||||
const int NUM_EDIT_TO_DEVICE_SLOTS = 2;
|
const int NUM_EDIT_TO_DEVICE_SLOTS = 2;
|
||||||
const int NUM_EDIT_TO_MENU_SLOTS = 2;
|
const int NUM_EDIT_TO_MENU_SLOTS = 2;
|
||||||
|
|
||||||
@@ -137,8 +137,8 @@ const int NUM_EDIT_TO_MENU_SLOTS = 2;
|
|||||||
*/
|
*/
|
||||||
struct MapEditToDI
|
struct MapEditToDI
|
||||||
{
|
{
|
||||||
DeviceInput button[NUM_EDIT_BUTTONS][NUM_EDIT_TO_DEVICE_SLOTS];
|
DeviceInput button[NUM_EditButton][NUM_EDIT_TO_DEVICE_SLOTS];
|
||||||
DeviceInput hold[NUM_EDIT_BUTTONS][NUM_EDIT_TO_DEVICE_SLOTS];
|
DeviceInput hold[NUM_EditButton][NUM_EDIT_TO_DEVICE_SLOTS];
|
||||||
void Clear()
|
void Clear()
|
||||||
{
|
{
|
||||||
FOREACH_EditButton(e)
|
FOREACH_EditButton(e)
|
||||||
@@ -153,7 +153,7 @@ struct MapEditToDI
|
|||||||
// Like MapEditToDI, but maps MenuButton instead of DeviceInput.
|
// Like MapEditToDI, but maps MenuButton instead of DeviceInput.
|
||||||
struct MapEditButtonToMenuButton
|
struct MapEditButtonToMenuButton
|
||||||
{
|
{
|
||||||
MenuButton button[NUM_EDIT_BUTTONS][NUM_EDIT_TO_MENU_SLOTS];
|
MenuButton button[NUM_EditButton][NUM_EDIT_TO_MENU_SLOTS];
|
||||||
void Clear()
|
void Clear()
|
||||||
{
|
{
|
||||||
FOREACH_EditButton(e)
|
FOREACH_EditButton(e)
|
||||||
|
|||||||
Reference in New Issue
Block a user