ScummVM API documentation
Asylum::Cursor Class Reference

#include <cursor.h>

Public Member Functions

 Cursor (AsylumEngine *engine)
 
void show () const
 
void hide () const
 
bool isHidden () const
 
void set (ResourceId resourceId, int32 cnt=0, CursorAnimation anim=kCursorAnimationMirror, int32 frames=-1)
 
void animate ()
 
void setState (const Common::Event &evt)
 
byte getState ()
 
void setForceHide (bool state)
 
ResourceId getResourceId ()
 
CursorAnimation getAnimation ()
 
const Common::Point position () const
 

Detailed Description

Asylum cursors are GraphicResources, and are stored in ResourcePacks, as are all game assets.

Member Function Documentation

◆ show()

void Asylum::Cursor::show ( ) const

Show the current cursor

◆ hide()

void Asylum::Cursor::hide ( ) const

Hide the current cursor

◆ isHidden()

bool Asylum::Cursor::isHidden ( ) const

Query if the cursor is hidden.

Returns
true if hidden, false if not.

◆ set()

void Asylum::Cursor::set ( ResourceId  resourceId,
int32  cnt = 0,
CursorAnimation  anim = kCursorAnimationMirror,
int32  frames = -1 
)

Set the current cursor instance to the graphic resource provide. The frames parameter defaults to -1, which in this case means that the frame count should be derived from the graphic resource as opposed to being explicitly set.

Parameters
resourceIdIdentifier for the resource.
cntThe counter.
animThe animation type
framesThe frames.

◆ animate()

void Asylum::Cursor::animate ( )

Get the next logical frame from the currently loaded cursorResource and draw it

◆ position()

const Common::Point Asylum::Cursor::position ( ) const

Return the cursor's position on the screen


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