DisableEditorClickthrough() public static method

public static DisableEditorClickthrough ( Rect guiWindowRect ) : void
guiWindowRect UnityEngine.Rect
return void
示例#1
0
        void OnGUI()
        {
            GUI.skin = HighLogic.Skin;
            GUI.skin.label.alignment  = TextAnchor.MiddleCenter;
            GUI.skin.button.alignment = TextAnchor.MiddleCenter;

            if (showGUI != guiMode.None)
            {
                guiMainWindowPos = GUILayout.Window(GetInstanceID(), guiMainWindowPos, GuiMainWindow, this.part.partInfo.title, GUILayout.MinWidth(1), GUILayout.MinHeight(1));
                if (HighLogic.LoadedSceneIsEditor)
                {
                    KAS_Shared.DisableEditorClickthrough(guiMainWindowPos);
                }
            }
        }