For plugin developers that would like a timed delay between the selection of an action and the execution of the action, this capability offers a visual countdown for the user by displaying the usual wait cursor with a decrementing integer value displayed in the center of the wait cursor.
Description of change
New public methods added to GUIWaitCursor:
New delegate (used for callback handling):
Choose one of:
- Select a method that should execute after some time delay. The method you select should have a method signature that matches the delegate method.
- Define a GUI message that should be sent after some time delay.
To display the wait cursor with the countdown and have either the delegate method called or the GUI message sent when the count down value reaches zero simply call the appropriate
is a non-blocking method (wait cursor spawns a new thread to handle its work). You can test to see if an elapsed event is pending by calling
hides the wait cursor and prevents (cancels) the event from executing.
The font used by the wait cursor to display the count down values must be defined in the fonts.xml skin file; the font name must be "waitcursor".
The image below shows the wait cursor displayed with a pending event (which will execute in 3 seconds).
Example 1: Call a method
Example 2: Send a message
This page has no comments.