| 1 |
/* |
| 2 |
* Copyright (C) 2004 Ivo Danihelka ([email protected]) |
| 3 |
* |
| 4 |
* This program is free software; you can redistribute it and/or modify |
| 5 |
* it under the terms of the GNU General Public License as published by |
| 6 |
* the Free Software Foundation; either version 2 of the License, or |
| 7 |
* (at your option) any later version. |
| 8 |
*/ |
| 9 |
#include "OptionsInput.h" |
| 10 |
|
| 11 |
#include "MenuOptions.h" |
| 12 |
|
| 13 |
//----------------------------------------------------------------- |
| 14 |
OptionsInput::OptionsInput(MenuOptions *menu) |
| 15 |
: StateInput(menu) |
| 16 |
{ |
| 17 |
} |
| 18 |
//----------------------------------------------------------------- |
| 19 |
MenuOptions * |
| 20 |
OptionsInput::getMenu() |
| 21 |
{ |
| 22 |
return dynamic_cast<MenuOptions*>(m_state); |
| 23 |
} |
| 24 |
//----------------------------------------------------------------- |
| 25 |
/** |
| 26 |
* Toggle menu. |
| 27 |
*/ |
| 28 |
void |
| 29 |
OptionsInput::enableMenu() |
| 30 |
{ |
| 31 |
quitState(); |
| 32 |
} |
| 33 |
//----------------------------------------------------------------- |
| 34 |
void |
| 35 |
OptionsInput::mouseEvent(const MouseStroke &buttons) |
| 36 |
{ |
| 37 |
getMenu()->mouseButton(buttons); |
| 38 |
} |
| 39 |
|