GuiWindow Class |
Namespace: KSPDev.GUIUtils
The GuiWindow type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() ![]() | DragWindow |
Makes the window movable. It's an improved version of the stock GUI.DragWindow()
method.
|
public class GuiWindowDemo1 : MonoBehaviour { Rect windowRect; Rect titleBarRect = new Rect(0, 0, 10000, 20); void OnGUI() { windowRect = GUILayout.Window(12345, windowRect, WindowFunc, "Test title"); } void WindowFunc(int windowId) { // ...add the controls.... // Allow the window to be dragged by its title bar. GuiWindow.DragWindow(ref windowRect, titleBarRect); } }