ZVISION: Add key press support to Controls

This commit is contained in:
RichieSams 2013-09-15 14:05:25 -05:00
parent d643ca1571
commit c20a9ac6ae

View File

@ -25,6 +25,8 @@
#include "common/types.h" #include "common/types.h"
#include "common/keyboard.h"
namespace Common { namespace Common {
class SeekableReadStream; class SeekableReadStream;
@ -68,6 +70,18 @@ public:
* @return Was the cursor changed? * @return Was the cursor changed?
*/ */
virtual bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) { return false; } virtual bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) { return false; }
/**
* Called when a key is pressed. Default is NOP.
*
* @param keycode The key that was pressed
*/
virtual void onKeyDown(Common::KeyState keyState) {}
/**
* Called when a key is released. Default is NOP.
*
* @param keycode The key that was pressed
*/
virtual void onKeyUp(Common::KeyState keyState) {}
/** /**
* Processes the node given the deltaTime since last frame. Default is NOP. * Processes the node given the deltaTime since last frame. Default is NOP.
* *