CmdSpinner

From MCS Wiki AVR
Jump to: navigation, search

Contents

Action

Start an animated spinner.

 

 

Syntax

CmdSpinner x, y, style, range

 

 

Remarks

x

The X coordinate of top left of spinner

y

The Y coordinate of top left of spinner

style

The style of spinner. Valid range is from 0 to 3

range

The scaling coefficient of spinner. 0 means no scaling

 

The spinner is an animated overlay that shows the user that some task is continuing. To trigger  the  spinner,  create  a  display  list  and then use CMD_SPINNER. The co-processor engine overlays the spinner on the current display list, swaps the  display list to make it

visible, then continuously animates until it receives CMD_STOP. REG_MACRO_0 and REG_MACRO_1  registers are utilized to perform the  animation kind of effect. The frequency of points movement is with respect to the display frame rate configured.

 

Typically for 480x272 display panels the display rate is ~60fps.

 

For style 0 and 60fps the point repeats the sequence within 2 seconds.

For style 1 and 60fps the point repeats the  sequence within 1.25 seconds.

For style 2 and 60fps the clock hand repeats the sequence within 2 seconds.

For style 3 and 60fps the moving dots repeat the sequence within 1 second.

 

Note that only one of CmdSketchCmdScreenSaver or CmdSpinner can be active at one time.

 

 

 

Example

' Pseudocode
 
' Create a display list, then start the spinner
Clear_B 1,1,1
CmdText 80, 30, 27, OPT_CENTER, "Please wait..."
CmdSpinner 80, 60, 0, 0
Clip0056.png
' Spinner style 0, a circle of dots
CmdSpinner 80, 60, 0, 0
Clip0057.png
' Style 1, a line of dots
CmdSpinner 80, 60, 1, 0
Clip0058.png
' Style 2, a rotating clock hand
CmdSpinner 80, 60, 2, 0
Clip0059.png
' Style 3, two orbiting dots
CmdSpinner 80, 60, 3, 0
Clip0060.png
' Half screen, scale 1
CmdSpinner 80, 60, 0, 1
Clip0061.png
' Full screen, scale 2
CmdSpinner 80, 60, 0, 2
Clip0062.png
Languages   English  
Personal tools
Namespaces
Variants
Actions
Navigation
Language