public override void DrawGUI(object sender) { if (this.core == null) { return; } GUI.skin = this.core.Skin; Rect _Pos = this.WindowPos; _Pos = ClickThruBlocker.GUILayoutWindow( this.core.WindowID, _Pos, VOID_Tools.GetWindowHandler(this.ModuleWindow), this.Name, GUILayout.Width(this.defWidth), GUILayout.Height(this.defHeight) ); bool cursorInWindow = _Pos.Contains(Mouse.screenPos); if (cursorInWindow) { this.setUILock(); } else { this.removeUILock(); } if (HighLogic.LoadedSceneIsEditor) { _Pos = WindowTools.ClampRectToEditorPad(_Pos); } else { _Pos = WindowTools.ClampRectToScreen(_Pos); } if (_Pos != this.WindowPos) { this.WindowPos = _Pos; this.core.configDirty = true; } }