Files
itgmania212121/stepmania/src/MenuInput.h
T

50 lines
1.1 KiB
C
Raw Normal View History

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