Minor cleanup
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5365 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
b1e7e6e15c
commit
4356939ca2
@ -279,10 +279,8 @@ EventPropagation EventHandler::onWidgetActivated(GUIEngine::Widget* w, const int
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Called by the input module
|
||||
*/
|
||||
void EventHandler::processAction(const int action, const unsigned int value, Input::InputType type, const int playerID)
|
||||
void EventHandler::processGUIAction(const PlayerAction action, const unsigned int value,
|
||||
Input::InputType type, const int playerID)
|
||||
{
|
||||
const bool pressedDown = value > Input::MAX_VALUE*2/3;
|
||||
|
||||
|
@ -40,6 +40,7 @@ namespace GUIEngine
|
||||
|
||||
/**
|
||||
* \brief Class to handle irrLicht events (GUI and input as well)
|
||||
*
|
||||
* input events will be redirected to the input module in game mode.
|
||||
* In menu mode, input is mapped to game actions with the help of the input
|
||||
* module, then calls are made to move focus / trigger an event / etc.
|
||||
@ -79,7 +80,8 @@ namespace GUIEngine
|
||||
* and this action needs to be applied to the GUI (e.g. fire pressed, left
|
||||
* pressed, etc.) this method is called back by the input module.
|
||||
*/
|
||||
void processAction(const int action, const unsigned int value, Input::InputType type, const int playerID);
|
||||
void processGUIAction(const PlayerAction action, const unsigned int value,
|
||||
Input::InputType type, const int playerID);
|
||||
|
||||
/** singleton access */
|
||||
static EventHandler* get();
|
||||
|
@ -461,7 +461,7 @@ void InputManager::dispatchInput(Input::InputType type, int deviceID, int btnID,
|
||||
}
|
||||
|
||||
// all is good, pass the translated input event on to the event handler
|
||||
GUIEngine::EventHandler::get()->processAction(action, abs(value), type, playerID);
|
||||
GUIEngine::EventHandler::get()->processGUIAction(action, abs(value), type, playerID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user