ドキュメント

Unity Engine

Unity Engine

ModalWindow

Show a Modal Window.
読み終わるまでの所要時間 4 分最終更新 1ヶ月前

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

id

A unique id number.

clientRect

Position and size of the window.

A function which contains the immediate mode GUI code to draw the contents of your window.

text

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

id

A unique id number.

clientRect

Position and size of the window.

A function which contains the immediate mode GUI code to draw the contents of your window.

image

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

id

A unique id number.

clientRect

Position and size of the window.

A function which contains the immediate mode GUI code to draw the contents of your window.

content

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

id

A unique id number.

clientRect

Position and size of the window.

A function which contains the immediate mode GUI code to draw the contents of your window.

text

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

id

A unique id number.

clientRect

Position and size of the window.

A function which contains the immediate mode GUI code to draw the contents of your window.

image

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

id

A unique id number.

clientRect

Position and size of the window.

A function which contains the immediate mode GUI code to draw the contents of your window.

content

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.