Files
itgmania212121/stepmania/src/MenuInput.h
T
Chris Danford 22ef6c358b moved PlayerNumber into a separate header to reduce dependences on GameConstantsAndTypes.h
default mappings for menu buttons
items in battle now have a duration
fix VC6 compile errors
2003-02-26 00:20:00 +00:00

50 lines
1.1 KiB
C

#ifndef MENUINPUT_H
#define MENUINPUT_H
/*
-----------------------------------------------------------------------------
Class: MenuInput
Desc: An input event specific to a menu navigation. This is generated based
on a GameDef.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "PlayerNumber.h"
enum MenuButton
{
MENU_BUTTON_LEFT = 0,
MENU_BUTTON_RIGHT,
MENU_BUTTON_UP,
MENU_BUTTON_DOWN,
MENU_BUTTON_START,
MENU_BUTTON_BACK,
MENU_BUTTON_COIN,
MENU_BUTTON_OPERATOR,
NUM_MENU_BUTTONS, // leave this at the end
MENU_BUTTON_INVALID
};
struct MenuInput
{
MenuInput() { MakeInvalid(); };
MenuInput( PlayerNumber pn, MenuButton b ) { player = pn; button = b; };
PlayerNumber player;
MenuButton button;
// bool operator==( const MenuInput &other ) { return player == other.player && button == other.button; };
inline bool IsValid() const { return player != PLAYER_INVALID; };
inline void MakeInvalid() { player = PLAYER_INVALID; button = MENU_BUTTON_INVALID; };
};
#endif