ScummVM API documentation
ZVision::LinearScroller Class Reference

#include <scroller.h>

Public Member Functions

 LinearScroller (const int16 activePos, const int16 idlePos, const int16 period=500)
 
void reset ()
 Set idle and immediately jump to idle position.
 
bool update (uint32 deltatime)
 Calculate updated position of scrolled graphics; return true if redraw is necessary.
 
void setActive (bool active)
 Set active or idle & scroll at set speed from current position to that position.
 
bool isMoving ()
 
int16 getPos ()
 

Public Attributes

int16 _pos
 
int16 _prevPos
 

Detailed Description

Automatically scroll a GUI menu or similar graphical element between an active and an idle position Movement in one dimension; idle & active positions specified as int16. Movement is at constant speed determined by period, specified in ms. If active/idle status is changed mid-transition, will scroll from current position to the appropriate position. LinearScroller also be used to reversibly scroll animation frames.


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