ScummVM API documentation
ZVision::Control Class Reference

#include <control.h>

Inheritance diagram for ZVision::Control:
ZVision::FistControl ZVision::HotMovControl ZVision::InputControl ZVision::LeverControl ZVision::PaintControl ZVision::PushToggleControl ZVision::SafeControl ZVision::SaveControl ZVision::SlotControl ZVision::TitlerControl

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 &parameter, Common::String &values)
 

Protected Attributes

ZVision_engine
 
uint32 _key
 
int32 _venusId
 

Detailed Description

The base class for all Controls.

Controls are the things that the user interacts with. Ex: A lever on the door

Member Function Documentation

◆ onMouseDown()

virtual bool ZVision::Control::onMouseDown ( const Common::Point screenSpacePos,
const Common::Point backgroundImageSpacePos 
)
inlinevirtual

Called when LeftMouse is pushed. Default is NOP.

Parameters
screenSpacePosThe position of the mouse in screen space
backgroundImageSpacePosThe position of the mouse in background image space

Reimplemented in ZVision::LeverControl, ZVision::PaintControl, and ZVision::PushToggleControl.

◆ onMouseUp()

virtual bool ZVision::Control::onMouseUp ( const Common::Point screenSpacePos,
const Common::Point backgroundImageSpacePos 
)
inlinevirtual

Called when LeftMouse is lifted. Default is NOP.

Parameters
screenSpacePosThe position of the mouse in screen space
backgroundImageSpacePosThe 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.

◆ onMouseMove()

virtual bool ZVision::Control::onMouseMove ( const Common::Point screenSpacePos,
const Common::Point backgroundImageSpacePos 
)
inlinevirtual

Called on every MouseMove. Default is NOP.

Parameters
screenSpacePosThe position of the mouse in screen space
backgroundImageSpacePosThe position of the mouse in background image space
Returns
Was the cursor changed?

Reimplemented in ZVision::LeverControl, ZVision::FistControl, ZVision::InputControl, ZVision::PushToggleControl, ZVision::PaintControl, ZVision::SafeControl, ZVision::SlotControl, and ZVision::HotMovControl.

◆ onKeyDown()

virtual bool ZVision::Control::onKeyDown ( Common::KeyState  keyState)
inlinevirtual

Called when a key is pressed. Default is NOP.

Parameters
keycodeThe key that was pressed

Reimplemented in ZVision::InputControl.

◆ onKeyUp()

virtual bool ZVision::Control::onKeyUp ( Common::KeyState  keyState)
inlinevirtual

Called when a key is released. Default is NOP.

Parameters
keycodeThe key that was pressed

◆ process()

virtual bool ZVision::Control::process ( uint32  deltaTimeInMillis)
inlinevirtual

Processes the node given the deltaTime since last frame. Default is NOP.

Parameters
deltaTimeInMillisThe number of milliseconds that have passed since last frame
Returns
If true, the node can be deleted after process() finishes

Reimplemented in ZVision::LeverControl, ZVision::FistControl, ZVision::InputControl, ZVision::PaintControl, ZVision::SafeControl, ZVision::SlotControl, ZVision::HotMovControl, and ZVision::SaveControl.


The documentation for this class was generated from the following file: