Game Development Reference
In-Depth Information
The Window control
The last weapon in the legacy GUI arsenal is the Window control. As the name
suggests, this defines a separate drawable window for your controls.
The window behavior is similar to ScrollView ; however, it is
just one layer. Any controls drawn outside the bounds of the
window are simply not drawn.
But there is nothing to stop you using a ScrollView control
inside a Window to achieve the same thing however.
With this separate Window, we can control many things, including:
• The modal nature of the Window
Modal means that this window is the only one you can control;
non-modal means it is a side-by-side window
• The drag state of Window ; as in, the window can be dragged by holding
on with a mouse or touch
• The draw order of each Window ; this allows sorting of draw windows on
top of each other
• The specific Window in focus, if there are multiple side-by-side windows
or a modal window
This opens lots of possibilities with a GUI Window .
The full Window example can be found in the BasicGUI script in
the sample project, displaying all the same controls as before but
within a single separate Window control.
To create a Window control, you first need to define a new method callback for the
Window using the following signature:
void DoMyWindow(int windowID)
{
}
 
Search WWH ::




Custom Search