ModalWindow
Show a Modal Window.
Read time 4 minutesLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.IMGUIModule
ModalWindow(int, Rect, WindowFunction, string)
Show a Modal Window.
public static Rect ModalWindow(int id, Rect clientRect, GUI.WindowFunction func, string text)
Parameters
A unique id number.
Position and size of the window.
A function which contains the immediate mode GUI code to draw the contents of your window.
Text to appear in the title-bar area of the window, if any.
Returns
Type | Description |
|---|---|
| Rect |
Remarks
Similar to GUI.Window, however the window will always be on top of all other GUI, and while displayed, is guaranteed to be sole recipient of all GUI input and events. While a ModalWindow is being displayed, other controls will not be processing input. Note that only one ModalWindow can be displayed at a time.
ModalWindow(int, Rect, WindowFunction, Texture)
Show a Modal Window.
public static Rect ModalWindow(int id, Rect clientRect, GUI.WindowFunction func, Texture image)
Parameters
A unique id number.
Position and size of the window.
A function which contains the immediate mode GUI code to draw the contents of your window.
An image to appear in the title bar of the window, if any.
Returns
Type | Description |
|---|---|
| Rect |
Remarks
Similar to GUI.Window, however the window will always be on top of all other GUI, and while displayed, is guaranteed to be sole recipient of all GUI input and events. While a ModalWindow is being displayed, other controls will not be processing input. Note that only one ModalWindow can be displayed at a time.
ModalWindow(int, Rect, WindowFunction, GUIContent)
Show a Modal Window.
public static Rect ModalWindow(int id, Rect clientRect, GUI.WindowFunction func, GUIContent content)
Parameters
A unique id number.
Position and size of the window.
A function which contains the immediate mode GUI code to draw the contents of your window.
GUIContent to appear in the title bar of the window, if any.
Returns
Type | Description |
|---|---|
| Rect |
Remarks
Similar to GUI.Window, however the window will always be on top of all other GUI, and while displayed, is guaranteed to be sole recipient of all GUI input and events. While a ModalWindow is being displayed, other controls will not be processing input. Note that only one ModalWindow can be displayed at a time.
ModalWindow(int, Rect, WindowFunction, string, GUIStyle)
Show a Modal Window.
public static Rect ModalWindow(int id, Rect clientRect, GUI.WindowFunction func, string text, GUIStyle style)
Parameters
A unique id number.
Position and size of the window.
A function which contains the immediate mode GUI code to draw the contents of your window.
Text to appear in the title-bar area of the window, if any.
Style to apply to the window.
Returns
Type | Description |
|---|---|
| Rect |
Remarks
Similar to GUI.Window, however the window will always be on top of all other GUI, and while displayed, is guaranteed to be sole recipient of all GUI input and events. While a ModalWindow is being displayed, other controls will not be processing input. Note that only one ModalWindow can be displayed at a time.
ModalWindow(int, Rect, WindowFunction, Texture, GUIStyle)
Show a Modal Window.
public static Rect ModalWindow(int id, Rect clientRect, GUI.WindowFunction func, Texture image, GUIStyle style)
Parameters
A unique id number.
Position and size of the window.
A function which contains the immediate mode GUI code to draw the contents of your window.
An image to appear in the title bar of the window, if any.
Style to apply to the window.
Returns
Type | Description |
|---|---|
| Rect |
Remarks
Similar to GUI.Window, however the window will always be on top of all other GUI, and while displayed, is guaranteed to be sole recipient of all GUI input and events. While a ModalWindow is being displayed, other controls will not be processing input. Note that only one ModalWindow can be displayed at a time.
ModalWindow(int, Rect, WindowFunction, GUIContent, GUIStyle)
Show a Modal Window.
public static Rect ModalWindow(int id, Rect clientRect, GUI.WindowFunction func, GUIContent content, GUIStyle style)
Parameters
A unique id number.
Position and size of the window.
A function which contains the immediate mode GUI code to draw the contents of your window.
GUIContent to appear in the title bar of the window, if any.
Style to apply to the window.
Returns
Type | Description |
|---|---|
| Rect |
Remarks
Similar to GUI.Window, however the window will always be on top of all other GUI, and while displayed, is guaranteed to be sole recipient of all GUI input and events. While a ModalWindow is being displayed, other controls will not be processing input. Note that only one ModalWindow can be displayed at a time.