The Gauge class is a dialog containing a
custom gauge control. This is used for the dialog to adjust the game speed,
as well as the dialog for the sound volume.
Properties
- elements
- size
- text
- window
- theItem
- nsTop
- nsLeft
- nsBottom
- nsRight
- time
- busy
- seconds
- lastSeconds
- description
- higher
- lower
- normal
- minimum
- maximum
Methods
-
void
init(number gaugePos) |
Sets up the gauge dialog with
gaugePos as the position of the gauge.
|
void
doit(number gaugePos) |
Performs the dialog's actions.
Handles the button presses, obtains the events, and updates
the gauge as needed.
|
-
heapPtr handleEvent(heapPtr
pEvent) |
Handles the dialogs input.
It checks if the user presses
the arrow keys or uses the joystick and adjusts the gauge accordingly.
It returns a pointer to the object (control) selected. If none
is selected, it returns NULL.
|
-
void
update(number gaugePos) |
Updates the gauge position and
draws the updated gauge control.
|
|