#include <control.h>
Public Types | |
enum | ControlType { CONTROL_UNKNOW, CONTROL_INPUT, CONTROL_PUSHTGL, CONTROL_SLOT, CONTROL_LEVER, CONTROL_SAVE, CONTROL_SAFE, CONTROL_FIST, CONTROL_TITLER, CONTROL_HOTMOV, CONTROL_PAINT } |
Public Member Functions | |
Control (ZVision *engine, uint32 key, ControlType type) | |
uint32 | getKey () |
ControlType | getType () |
virtual void | focus () |
virtual void | unfocus () |
virtual bool | onMouseDown (const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) |
virtual bool | onMouseUp (const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) |
virtual bool | onMouseMove (const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) |
virtual bool | onKeyDown (Common::KeyState keyState) |
virtual bool | onKeyUp (Common::KeyState keyState) |
virtual bool | process (uint32 deltaTimeInMillis) |
void | setVenus () |
Static Public Member Functions | |
static void | parseFlatControl (ZVision *engine) |
static void | parsePanoramaControl (ZVision *engine, Common::SeekableReadStream &stream) |
static void | parseTiltControl (ZVision *engine, Common::SeekableReadStream &stream) |
Protected Member Functions | |
void | getParams (const Common::String &inputStr, Common::String ¶meter, Common::String &values) |
Protected Attributes | |
ZVision * | _engine |
uint32 | _key |
int32 | _venusId |
The base class for all Controls.
Controls are the things that the user interacts with. Ex: A lever on the door
|
inlinevirtual |
Called when LeftMouse is pushed. Default is NOP.
screenSpacePos | The position of the mouse in screen space |
backgroundImageSpacePos | The position of the mouse in background image space |
Reimplemented in ZVision::LeverControl, ZVision::PaintControl, and ZVision::PushToggleControl.
|
inlinevirtual |
Called when LeftMouse is lifted. Default is NOP.
screenSpacePos | The position of the mouse in screen space |
backgroundImageSpacePos | The position of the mouse in background image space |
Reimplemented in ZVision::LeverControl, ZVision::FistControl, ZVision::InputControl, ZVision::SafeControl, ZVision::HotMovControl, ZVision::PushToggleControl, ZVision::SlotControl, and ZVision::PaintControl.
|
inlinevirtual |
Called on every MouseMove. Default is NOP.
screenSpacePos | The position of the mouse in screen space |
backgroundImageSpacePos | The position of the mouse in background image space |
Reimplemented in ZVision::LeverControl, ZVision::FistControl, ZVision::InputControl, ZVision::PushToggleControl, ZVision::PaintControl, ZVision::SafeControl, ZVision::SlotControl, and ZVision::HotMovControl.
|
inlinevirtual |
Called when a key is pressed. Default is NOP.
keycode | The key that was pressed |
Reimplemented in ZVision::InputControl.
|
inlinevirtual |
Called when a key is released. Default is NOP.
keycode | The key that was pressed |
|
inlinevirtual |
Processes the node given the deltaTime since last frame. Default is NOP.
deltaTimeInMillis | The number of milliseconds that have passed since last frame |
Reimplemented in ZVision::LeverControl, ZVision::FistControl, ZVision::InputControl, ZVision::PaintControl, ZVision::SafeControl, ZVision::SlotControl, ZVision::HotMovControl, and ZVision::SaveControl.