The Dialog class is the class for dialog
windows. In these windows, you can set up a graphical user interface for
your game.
Properties
- elements
- size
- text
- window
- theItem
- nsTop
- nsLeft
- nsBottom
- nsRight
- time
- busy
- seconds
- lastSeconds
Methods
-
bool doit(heapPtr
pItem) |
Performs the dialog's actions.
Initalizes, the controls, selects the control, and checks itself.
If pItem is specified, that control will be the default selected
control. Otherwise, the first preset selected one is selected.
It returns TRUE is the event is claimed, FALSE if otherwise.
|
-
void open(number
theType, number thePriority) |
Opens the window with theType
as it's type and thePriority as it's priority. See kernel NewWindow()
for more information.
|
-
void draw() |
Draws the dialog's controls.
|
-
void cue() |
If the busy property is FALSE,
it disposes of itself. Otherwise, it sets the busy property
to FALSE.
|
-
void advance(number
amount) |
Selects the next control in the
dialog (ie. when the user presses the tab key).
|
-
void retreat(number
amount) |
Selects the previous control in
the dialog.
|
-
void move(number
theX, number theY) |
Moves the control theX pixels
horizontally, and theY pixels vertically.
|
-
void moveTo(number
newX, number newY) |
Moves the control to the newX
and newY positions.
|
-
void center() |
Sets the dialog to the center
of the screen (or it's parent window).
|
-
void setSize() |
Sets the dialog's size based on
the controls in it.
|
-
heapPtr handleEvent(heapPtr
pEvent) |
Handles the dialogs input. It
returns a pointer to the object (control) selected. If none
is selected, it returns NULL.
|
-
void
check() |
Checks and sets the lastSeconds
and seconds properties. It then cues the Dialog if seconds is
0.
|
|