UnityEngine.GUILayout.Window(int, UnityEngine.Rect, UnityEngine.GUI.WindowFunction, UnityEngine.GUIContent, UnityEngine.GUIStyle, params UnityEngine.GUILayoutOption[])

Here are the examples of the csharp api UnityEngine.GUILayout.Window(int, UnityEngine.Rect, UnityEngine.GUI.WindowFunction, UnityEngine.GUIContent, UnityEngine.GUIStyle, params UnityEngine.GUILayoutOption[]) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

69 Examples 7

19 View Source File : NewGameFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            if (_customCharaFile != null && _targetScene == Scene.Instance.AddSceneName)
            {
                _guiActive = true;
                var screenRect = GetFullscreenBrowserRect();
                IMGUIUtils.DrawSolidBox(screenRect);
                GUILayout.Window(362, screenRect, TreeWindow, "Select character folder");
                IMGUIUtils.EatInputInRect(screenRect);
            }
            else if (_guiActive)
            {
                _folderTreeView?.StopMonitoringFiles();
                _guiActive = false;
            }
        }

19 View Source File : MakerOutfitFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            var guiShown = false;
            // Check the opened category
            if (_catToggle != null && _catToggle.isOn && _targetScene == Scene.Instance.AddSceneName)
            {
                // Check opened tab
                if (_saveOutfitToggle != null && _saveOutfitToggle.isOn || _loadOutfitToggle != null && _loadOutfitToggle.isOn)
                {
                    // Check if the character picture take screen is displayed
                    if (_saveFront == null || !_saveFront.activeSelf)
                    {
                        if (_refreshList)
                        {
                            OnFolderChanged();
                            _refreshList = false;
                        }

                        var screenRect = new Rect((int)(Screen.width * 0.004), (int)(Screen.height * 0.57f), (int)(Screen.width * 0.125), (int)(Screen.height * 0.35));
                        IMGUIUtils.DrawSolidBox(screenRect);
                        GUILayout.Window(362, screenRect, TreeWindow, "Select outfit folder");
                        IMGUIUtils.EatInputInRect(screenRect);
                        _guiActive = guiShown = true;
                    }
                }
            }

            if (!guiShown && _guiActive)
            {
                _folderTreeView?.StopMonitoringFiles();
                _guiActive = false;
            }
        }

19 View Source File : FreeHFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            if (_freeHFile != null && !_isLive && _targetScene == Scene.Instance.AddSceneName)
            {
                _guiActive = true;
                var screenRect = ClreplacedroomFolders.GetFullscreenBrowserRect();
                IMGUIUtils.DrawSolidBox(screenRect);
                GUILayout.Window(362, screenRect, TreeWindow, "Select character folder");
                IMGUIUtils.EatInputInRect(screenRect);
            }
            else if (_guiActive)
            {
                _folderTreeView?.StopMonitoringFiles();
                _guiActive = false;
            }
        }

19 View Source File : MakerPoseSaveFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            // Check the opened category
            if (_poseSaveScene != null && _targetScene == Scene.Instance.AddSceneName)
            {
                if (_refreshList)
                {
                    OnFolderChanged();
                    _refreshList = false;
                }

                var screenRect = new Rect((int)(Screen.width * 0.004), (int)(Screen.height * 0.55f),
                    (int)(Screen.width * 0.125), (int)(Screen.height * 0.35));
                IMGUIUtils.DrawSolidBox(screenRect);
                GUILayout.Window(362, screenRect, TreeWindow, "Select pose folder");
                IMGUIUtils.EatInputInRect(screenRect);
            }
        }

19 View Source File : HOutfitFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            if (_uiObject && _uiObject.activeSelf && _sceneName == Manager.Scene.Instance.AddSceneName)
            {
                var screenRect = new Rect((int)(Screen.width * 0.004), (int)(Screen.height * 0.57f), (int)(Screen.width * 0.125), (int)(Screen.height * 0.35));
                IMGUIUtils.DrawSolidBox(screenRect);
                GUILayout.Window(36, screenRect, TreeWindow, "Select outfit folder");
                IMGUIUtils.EatInputInRect(screenRect);
            }
            else
            {
                _folderTreeView?.StopMonitoringFiles();
            }
        }

19 View Source File : HOutfitFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            if (_uiObject && _uiObject.activeSelf && _sceneName == Scene.AddSceneName && !Scene.IsOverlap && !Scene.IsNowLoadingFade)
            {
                var screenRect = new Rect((int)(Screen.width * 0.004), (int)(Screen.height * 0.57f), (int)(Screen.width * 0.125), (int)(Screen.height * 0.35));
                IMGUIUtils.DrawSolidBox(screenRect);
                GUILayout.Window(36, screenRect, TreeWindow, "Select outfit folder");
                IMGUIUtils.EatInputInRect(screenRect);
            }
            else
            {
                _folderTreeView?.StopMonitoringFiles();
            }
        }

19 View Source File : MakerOutfitFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            if (!IsVisible()) return;

            if (_refreshList)
            {
                OnFolderChanged();
                _refreshList = false;
            }

            var screenRect = new Rect((int)(Screen.width * 0.004), (int)(Screen.height * 0.57f),
                (int)(Screen.width * 0.125), (int)(Screen.height * 0.35));
            IMGUIUtils.DrawSolidBox(screenRect);
            GUILayout.Window(362, screenRect, TreeWindow, "Select outfit folder");
            IMGUIUtils.EatInputInRect(screenRect);
        }

19 View Source File : KKABMX_AdvancedGUI.cs
License : GNU Lesser General Public License v3.0
Project Creator : ManlyMarco

private void OnGUI()
        {
            if (_initGui)
            {
                _gsInput = new GUIStyle(UnityEngine.GUI.skin.textArea);
                _gsLabel = new GUIStyle(UnityEngine.GUI.skin.label);
                _gsButtonReset = new GUIStyle(UnityEngine.GUI.skin.button);
                _gsLabel.alignment = TextAnchor.MiddleRight;
                _gsLabel.normal.textColor = Color.white;

                _windowRect.x = Mathf.Min(Screen.width - _windowRect.width, Mathf.Max(0, _windowRect.x));
                _windowRect.y = Mathf.Min(Screen.height - _windowRect.height, Mathf.Max(0, _windowRect.y));

                _initGui = false;
            }

            if (!KKABMX_Core.TransparentAdvancedWindow.Value)
                KKAPI.Utilities.IMGUIUtils.DrawSolidBox(_windowRect);

            var newRect = GUILayout.Window(1724, _windowRect, DrawWindowContents, "Advanced Bone Sliders" + _currentCharacterName);
            // Prevent window resizing if content overflows
            _windowRect.x = newRect.x;
            _windowRect.y = newRect.y;

            // Prevent clicks from going through
            if (_windowRect.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y)))
                Input.ResetInputAxes();
        }

19 View Source File : PreviewWindow.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void DisplayWindow()
        {
            if (_objToDisplay == null) return;

            _windowRect = GUILayout.Window(_windowId, _windowRect, PreviewWindowFunc, _windowreplacedle);
            InterfaceMaker.EatInputInRect(_windowRect);
        }

19 View Source File : MakerFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            var visibleWindow = IsVisible();
            if (visibleWindow == VisibleWindow.None)
            {
                _lastRefreshed = VisibleWindow.None;
                if (!_guiActive)
                {
                    _folderTreeView?.StopMonitoringFiles();
                    _guiActive = false;
                }
                return;
            }

            _guiActive = true;
            if (_lastRefreshed != visibleWindow) RefreshCurrentWindow();

            var screenRect = GetDisplayRect();
            IMGUIUtils.DrawSolidBox(screenRect);
            GUILayout.Window(362, screenRect, TreeWindow, "Select character folder");
            IMGUIUtils.EatInputInRect(screenRect);
        }

19 View Source File : MakerCharaFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            // Check the opened category

            if (_catToggle != null && _catToggle.isOn && _targetScene == Scene.Instance.AddSceneName)
                // Check opened tab
                if (_loadCharaToggle != null && _loadCharaToggle.isOn ||
                    _saveCharaToggle != null && _saveCharaToggle.isOn)
                    // Check if the character picture take screen is displayed
                    if (_saveFront == null || !_saveFront.activeSelf)
                    {
                        if (_refreshList)
                        {
                            OnFolderChanged();
                            _refreshList = false;
                        }

                        var screenRect = new Rect((int)(Screen.width * 0.004), (int)(Screen.height * 0.57f),
                            (int)(Screen.width * 0.125), (int)(Screen.height * 0.35));
                        IMGUIUtils.DrawSolidBox(screenRect);
                        GUILayout.Window(362, screenRect, TreeWindow, "Select character folder");
                        IMGUIUtils.EatInputInRect(screenRect);
                    }
        }

19 View Source File : MakerOutfitFolder.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            bool guiShown = false;
            // Check the opened category
            if (_catToggle != null && _catToggle.isOn && _targetScene == Scene.Instance.AddSceneName)
            {
                // Check opened tab
                if (_loadOutfitToggle != null && _loadOutfitToggle.isOn || _saveOutfitToggle != null && _saveOutfitToggle.isOn)
                {
                    // Check if the character picture take screen is displayed
                    if (_saveFront == null || !_saveFront.activeSelf)
                    {
                        if (_refreshList)
                        {
                            _folderTreeView.ResetTreeCache();
                            OnFolderChanged();
                            _refreshList = false;
                        }

                        var screenRect = new Rect((int)(Screen.width * 0.004), (int)(Screen.height * 0.57f), (int)(Screen.width * 0.125), (int)(Screen.height * 0.35));
                        IMGUIUtils.DrawSolidBox(screenRect);
                        GUILayout.Window(362, screenRect, TreeWindow, "Select outfit folder");
                        IMGUIUtils.EatInputInRect(screenRect);
                        guiShown = true;
                    }
                }
            }

            if (!guiShown)
            {
                _folderTreeView?.StopMonitoringFiles();
            }

        }

19 View Source File : MakerSceneFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            // Check the opened category
            if (_hEditLoadSceneWindow != null && _targetScene == Scene.Instance.AddSceneName)
            {
                if (_refreshList)
                {
                    OnFolderChanged();
                    _refreshList = false;
                }

                var screenRect = new Rect((int)(Screen.width * 0.004), (int)(Screen.height * 0.55f),
                    (int)(Screen.width * 0.125), (int)(Screen.height * 0.35));
                IMGUIUtils.DrawSolidBox(screenRect);
                GUILayout.Window(362, screenRect, TreeWindow, "Select scene folder");
                IMGUIUtils.EatInputInRect(screenRect);
            }
        }

19 View Source File : BaseStudioFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            var entry = Helper.GetActiveEntry();
            if (_lastEntry != null && _lastEntry != entry)
            {
                _lastEntry.FolderTreeView?.StopMonitoringFiles();
                _lastEntry = null;
            }

            if (entry == null) return;
            _lastEntry = entry;
            var windowRect = GetMainRect();
            IMGUIUtils.DrawSolidBox(windowRect);
            GUILayout.Window(363, windowRect, id => TreeWindow(entry), WindowLabel);
            IMGUIUtils.EatInputInRect(windowRect);
        }

19 View Source File : Core.UncensorSelector.SettingsGUI.cs
License : GNU General Public License v3.0
Project Creator : IllusionMods

public void DoOnGUI()
            {
                if (!Initialized || Setting == null || !Visible) return;

                GUILayout.Window(WindowID, GUIRect, DoSettingsGUI, replacedleText);
                IMGUIUtils.DrawSolidBox(GUIRect);
                IMGUIUtils.EatInputInRect(GUIRect);
            }

19 View Source File : ClubInterface.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public static void OnGui(Unit _)
        {
            if (!ShowWindow) return;

            if (GUI.Button(_screenRect, string.Empty, GUI.skin.box) && !_windowRect.Contains(Input.mousePosition)) ShowWindow = false;

            if (_btnStyleDeselected == null)
            {
                _btnStyleDeselected = new GUIStyle(GUI.skin.button);
                _btnStyleDeselected.normal.background = GUI.skin.button.active.background;
                _btnStyleSelected = new GUIStyle(GUI.skin.button);
                _btnStyleSelected.normal.background = GUI.skin.button.onNormal.background;
                _btnStyleSelected.hover.background = GUI.skin.button.onHover.background;
            }

            IMGUIUtils.DrawSolidBox(_windowRect);
            GUILayout.Window(47238, _windowRect, CrestWindow, "replacedign lewd crests to club members");

            Input.ResetInputAxes();
        }

19 View Source File : MakerOutfitFolder.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            bool guiShown = false;
            // Check the opened category
            if (_catToggle != null && _catToggle.isOn && _targetScene == Scene.AddSceneName)
            {
                // Check opened tab
                if (_loadOutfitToggle != null && _loadOutfitToggle.isOn || _saveOutfitToggle != null && _saveOutfitToggle.isOn)
                {
                    // Check if the character picture take screen is displayed
                    if ((_saveFront == null || !_saveFront.activeSelf) && !Scene.IsOverlap && !Scene.IsNowLoadingFade)
                    {
                        if (_refreshList)
                        {
                            _folderTreeView.ResetTreeCache();
                            OnFolderChanged();
                            _refreshList = false;
                        }

                        var screenRect = new Rect((int)(Screen.width * 0.004), (int)(Screen.height * 0.57f), (int)(Screen.width * 0.125), (int)(Screen.height * 0.35));
                        IMGUIUtils.DrawSolidBox(screenRect);
                        GUILayout.Window(362, screenRect, TreeWindow, "Select outfit folder");
                        IMGUIUtils.EatInputInRect(screenRect);
                        guiShown = true;
                    }
                }
            }

            if (!guiShown)
            {
                _folderTreeView?.StopMonitoringFiles();
            }

        }

19 View Source File : StudioCharaFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            var entry = _charaListEntries.Values.FirstOrDefault(x => x.isActiveAndEnabled);
            if (_lastEntry != null && _lastEntry != entry)
            {
                _lastEntry.FolderTreeView?.StopMonitoringFiles();
                _lastEntry = null;
            }

            if (entry == null) return;
            _lastEntry = entry;
            var windowRect = new Rect((int) (Screen.width * 0.06f), (int) (Screen.height * 0.32f), (int) (Screen.width * 0.13f), (int) (Screen.height * 0.4f));
            IMGUIUtils.DrawSolidBox(windowRect);
            GUILayout.Window(363, windowRect, id => TreeWindow(entry), "Select folder with cards to view");
            IMGUIUtils.EatInputInRect(windowRect);
        }

19 View Source File : DebugMenu.cs
License : MIT License
Project Creator : ccgould

private void OnGUI()
        {
            if (_isOpen == false)
            {
                return;
            }

            Rect windowRect = GUILayout.Window(2352, Size, (id) =>
            {
                GUILayout.Box("P to show/hide cursor");
                GUILayout.BeginVertical();
                GUILayout.Space(10);
                GUILayout.BeginHorizontal();
                GUILayout.FlexibleSpace();
                _normalSkinSize = GUI.skin.label.fontSize;
                GUI.skin.label.fontSize = 15;
                GUILayout.Label("FCSDemo Controller");
                GUI.skin.label.fontSize = _normalSkinSize;
                GUILayout.FlexibleSpace();
                GUILayout.EndHorizontal();
                GUILayout.Space(10);

                GUILayout.BeginHorizontal();

                if (GUILayout.Button("Color Changer Menu"))
                    _showDebugMenuNo = 0;

                GUILayout.EndHorizontal();

                GUILayout.Space(20f);

                if (_showDebugMenuNo == 0)
                    ColorChangerMenu();
                else
                    GUILayout.Label("No Menu Selected");

                GUILayout.EndVertical();

            }, "FCSDemo Controller");
        }

19 View Source File : ObjectTreeViewer.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void DisplayViewer()
        {
            if (_wireframe && _actuallyInsideOnGui && Event.current.type == EventType.layout)
                GL.wireframe = false;

            if (Enabled)
            {
                _windowRect = GUILayout.Window(_windowId, _windowRect, WindowFunc, "Scene Browser - RuntimeUnityEditor v" + RuntimeUnityEditorCore.Version);
                InterfaceMaker.EatInputInRect(_windowRect);
            }
        }

19 View Source File : SceneFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            if (_studioInitObject != null)
            {
                _guiActive = true;
                var screenRect = new Rect((int)(Screen.width / 11.3f), (int)(Screen.height / 90f), (int)(Screen.width / 2.5f), (int)(Screen.height / 5f));
                IMGUIUtils.DrawSolidBox(screenRect);
                GUILayout.Window(362, screenRect, TreeWindow, "Select folder with scenes to view");
                IMGUIUtils.EatInputInRect(screenRect);
            }
            else if (_guiActive)
            {
                _folderTreeView?.StopMonitoringFiles();
                _guiActive = false;
            }
        }

19 View Source File : ClassroomFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            if (_customCharaFile != null && _customCharaFile.isVisible && _targetScene == Scene.Instance.AddSceneName)
            {
                var screenRect = GetFullscreenBrowserRect();
                IMGUIUtils.DrawSolidBox(screenRect);
                GUILayout.Window(362, screenRect, TreeWindow, "Select character folder");
                IMGUIUtils.EatInputInRect(screenRect);
            }
            else
            {
                _folderTreeView?.StopMonitoringFiles();
            }
        }

19 View Source File : VehicleRestrictionsTool.cs
License : MIT License
Project Creator : CitiesSkylinesMods

public override void OnToolGUI(Event e) {
            base.OnToolGUI(e);

            if (SelectedSegmentId != 0) {
                cursorInSecondaryPanel = false;

                Color oldColor = GUI.color;
                GUI.color = GUI.color.WithAlpha(TrafficManagerTool.GetWindowAlpha());

                windowRect = GUILayout.Window(
                    255,
                    windowRect,
                    _guiVehicleRestrictionsWindowDelegate,
                    T("Dialog.replacedle:Vehicle restrictions"),
                    WindowStyle,
                    EmptyOptionsArray);
                cursorInSecondaryPanel = windowRect.Contains(Event.current.mousePosition);
                GUI.color = oldColor;
                // overlayHandleHovered = false;
            }

            // ShowSigns(false);
        }

19 View Source File : MakerFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            var guiShown = false;
            // Check the opened category
            if (_catToggle != null && _catToggle.isOn && _targetScene == Scene.Instance.AddSceneName)
            {
                // Check opened tab
                if (_loadCharaToggle != null && _loadCharaToggle.isOn || _saveCharaToggle != null && _saveCharaToggle.isOn)
                {
                    // Check if the character picture take screen is displayed
                    if (_saveFront == null || !_saveFront.activeSelf)
                    {
                        if (_refreshList)
                        {
                            _folderTreeView.ResetTreeCache();
                            OnFolderChanged();
                            _refreshList = false;
                        }

                        var screenRect = new Rect((int)(Screen.width * 0.004), (int)(Screen.height * 0.57f), (int)(Screen.width * 0.125), (int)(Screen.height * 0.35));
                        IMGUIUtils.DrawSolidBox(screenRect);
                        GUILayout.Window(362, screenRect, TreeWindow, "Select character folder");
                        IMGUIUtils.EatInputInRect(screenRect);
                        guiShown = true;
                    }
                }
            }

            if (!guiShown)
            {
                _folderTreeView?.StopMonitoringFiles();
            }
        }

19 View Source File : StudioCharaFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            var entry = _charaListEntries.Values.SingleOrDefault(x => x.isActiveAndEnabled);
            if (_lastEntry != null && _lastEntry != entry)
            {
                _lastEntry.FolderTreeView?.StopMonitoringFiles();

                _lastEntry = null;
            }

            if (entry == null) return;
            _lastEntry = entry;
            var windowRect = new Rect((int)(Screen.width * 0.06f), (int)(Screen.height * 0.32f), (int)(Screen.width * 0.13f), (int)(Screen.height * 0.4f));
            IMGUIUtils.DrawSolidBox(windowRect);
            GUILayout.Window(363, windowRect, id => TreeWindow(entry), "Select folder with cards to view");
            IMGUIUtils.EatInputInRect(windowRect);
        }

19 View Source File : StudioOutfitFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            if (_costumeInfoEntry != null)
            {
                if (_costumeInfoEntry.isActive())
                {
                    _guiActive = true;
                    var windowRect = new Rect((int) (Screen.width * 0.06f), (int) (Screen.height * 0.32f),
                        (int) (Screen.width * 0.13f), (int) (Screen.height * 0.4f));
                    IMGUIUtils.DrawSolidBox(windowRect);
                    GUILayout.Window(363, windowRect, id => TreeWindow(), "Folder with outfits to view");
                    IMGUIUtils.EatInputInRect(windowRect);
                }
                else if (_guiActive)
                {
                    _costumeInfoEntry.FolderTreeView?.StopMonitoringFiles();
                    _guiActive = false;
                }
            }
        }

19 View Source File : NewGameFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            if (_newGame != null && _targetScene == Scene.Instance.AddSceneName)
            {
                var screenRect = GetFullscreenBrowserRect();
                IMGUIUtils.DrawSolidBox(screenRect);
                GUILayout.Window(362, screenRect, TreeWindow, "Select character folder");
                IMGUIUtils.EatInputInRect(screenRect);
            }
            else
            {
                _folderTreeView?.StopMonitoringFiles();
            }
        }

19 View Source File : ClassroomFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            if (_customCharaFile != null && _customCharaFile.isVisible && _targetScene == Scene.AddSceneName && !Scene.IsOverlap && !Scene.IsNowLoadingFade)
            {
                var screenRect = GetFullscreenBrowserRect();
                IMGUIUtils.DrawSolidBox(screenRect);
                GUILayout.Window(362, screenRect, TreeWindow, "Select character folder");
                IMGUIUtils.EatInputInRect(screenRect);
            }
            else
            {
                _folderTreeView?.StopMonitoringFiles();
            }
        }

19 View Source File : MakerMapFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            // Check the opened category
            if (_mapLoadScene != null && _targetScene == Scene.Instance.AddSceneName)
            {
                if (_refreshList)
                {
                    OnFolderChanged();
                    _refreshList = false;
                }

                var screenRect = new Rect((int) (Screen.width * 0.004), (int) (Screen.height * 0.55f),
                    (int) (Screen.width * 0.125), (int) (Screen.height * 0.35));
                IMGUIUtils.DrawSolidBox(screenRect);
                GUILayout.Window(362, screenRect, TreeWindow, "Select map folder");
                IMGUIUtils.EatInputInRect(screenRect);
            }
        }

19 View Source File : Core.AnimationController.cs
License : GNU General Public License v3.0
Project Creator : IllusionMods

internal void OnGUI()
        {
            if (GUIVisible)
            {
                AnimGUI = GUILayout.Window(23423475, AnimGUI, AnimWindow, PluginName);
                GUI.Box(AnimGUI, GUIContent.none, _bgStyle);
            }
        }

19 View Source File : MainGameFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            var visibleWindow = IsVisible();
            if (visibleWindow == VisibleWindow.None)
            {
                _lastVisibleWindow = VisibleWindow.None;
                if (_guiActive) _folderTreeView?.StopMonitoringFiles();
                _guiActive = false;
                return;
            }

            _guiActive = true;
            if (_lastVisibleWindow != visibleWindow) RefreshCurrentWindow();

            var screenRect = GetDisplayRect();
            IMGUIUtils.DrawSolidBox(screenRect);
            GUILayout.Window(362, screenRect, TreeWindow, "Select character folder");
            IMGUIUtils.EatInputInRect(screenRect);
        }

19 View Source File : FreeHFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            if (_freeHFile != null
                //&& !_isLive 
                && _targetScene == Scene.AddSceneName && !Scene.IsOverlap && !Scene.IsNowLoadingFade)
            {
                var screenRect = GetFullscreenBrowserRect();
                IMGUIUtils.DrawSolidBox(screenRect);
                GUILayout.Window(362, screenRect, TreeWindow, "Select character folder");
                IMGUIUtils.EatInputInRect(screenRect);
            }
            else
            {
                _folderTreeView?.StopMonitoringFiles();
            }
        }

19 View Source File : ClassroomFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            if (_canvas != null && _canvas.enabled && _targetScene == Scene.Instance.AddSceneName)
            {
                _guiActive = true;
                var screenRect = GetFullscreenBrowserRect();
                IMGUIUtils.DrawSolidBox(screenRect);
                GUILayout.Window(362, screenRect, TreeWindow, "Select character folder");
                IMGUIUtils.EatInputInRect(screenRect);
            }
            else if (_guiActive)
            {
                _folderTreeView?.StopMonitoringFiles();
                _guiActive = false;
            }
        }

19 View Source File : ExampleHelpWindow.cs
License : MIT License
Project Creator : BattleDawnNZ

private void OnGUI()
    {
        if (mShowingHelpWindow)
        {
            Vector2 size = GUI.skin.label.CalcSize(new GUIContent(m_Description));
            Vector2 halfSize = size * 0.5f;

            float maxWidth = Mathf.Min(Screen.width - kPadding, size.x);
            float left = Screen.width * 0.5f - maxWidth * 0.5f;
            float top = Screen.height * 0.4f - halfSize.y;

            Rect windowRect = new Rect(left, top, maxWidth, size.y);
            GUILayout.Window(400, windowRect, (id) => DrawWindow(id, maxWidth), m_replacedle);
        }
    }

19 View Source File : FreeHFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            if (_freeHFile != null
                //&& !_isLive 
                && _targetScene == Scene.Instance.AddSceneName)
            {
                var screenRect = GetFullscreenBrowserRect();
                IMGUIUtils.DrawSolidBox(screenRect);
                GUILayout.Window(362, screenRect, TreeWindow, "Select character folder");
                IMGUIUtils.EatInputInRect(screenRect);
            }
            else
            {
                _folderTreeView?.StopMonitoringFiles();
            }
        }

19 View Source File : MakerFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            var guiShown = false;
            // Check the opened category
            if (_catToggle != null && _catToggle.isOn && _targetScene == Scene.AddSceneName)
            {
                // Check opened tab
                if (_loadCharaToggle != null && _loadCharaToggle.isOn || _saveCharaToggle != null && _saveCharaToggle.isOn)
                {
                    // Check if the character picture take screen is displayed
                    if ((_saveFront == null || !_saveFront.activeSelf) && !Scene.IsOverlap && !Scene.IsNowLoadingFade && (_ccwGo == null || !_ccwGo.activeSelf))
                    {
                        if (_refreshList)
                        {
                            _folderTreeView.ResetTreeCache();
                            OnFolderChanged();
                            _refreshList = false;
                        }

                        var screenRect = new Rect((int)(Screen.width * 0.004), (int)(Screen.height * 0.57f), (int)(Screen.width * 0.125), (int)(Screen.height * 0.35));
                        IMGUIUtils.DrawSolidBox(screenRect);
                        GUILayout.Window(362, screenRect, TreeWindow, "Select character folder");
                        IMGUIUtils.EatInputInRect(screenRect);
                        guiShown = true;
                    }
                }
            }

            if (!guiShown)
            {
                _folderTreeView?.StopMonitoringFiles();
            }
        }

19 View Source File : MakerMapSaveFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            // Check the opened category
            if (_mapSaveScene != null && _targetScene == Scene.Instance.AddSceneName)
            {
                if (_refreshList)
                {
                    OnFolderChanged();
                    _refreshList = false;
                }

                var screenRect = new Rect((int) (Screen.width * 0.004), (int) (Screen.height * 0.55f),
                    (int) (Screen.width * 0.125), (int) (Screen.height * 0.35));
                IMGUIUtils.DrawSolidBox(screenRect);
                GUILayout.Window(362, screenRect, TreeWindow, "Select map folder");
                IMGUIUtils.EatInputInRect(screenRect);
            }
        }

19 View Source File : Ui.cs
License : GNU General Public License v3.0
Project Creator : k0np4ku

private void OnGUI()
        {
            GUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.idenreplacedy, new Vector3(Screen.width / 1024f, Screen.height / 576f, 1f));
            if (Inst != null)
                _windowRect = GUILayout.Window(0, _windowRect, MainWindow, GUIContent.none, GUIStyle.none);
        }

19 View Source File : MakerPoseFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            // Check the opened category
            if (_poseLoadScene != null && _targetScene == Scene.Instance.AddSceneName)
            {
                if (_refreshList)
                {
                    OnFolderChanged();
                    _refreshList = false;
                }

                var screenRect = new Rect((int) (Screen.width * 0.004), (int) (Screen.height * 0.55f),
                    (int) (Screen.width * 0.125), (int) (Screen.height * 0.35));
                IMGUIUtils.DrawSolidBox(screenRect);
                GUILayout.Window(362, screenRect, TreeWindow, "Select pose folder");
                IMGUIUtils.EatInputInRect(screenRect);
            }
        }

19 View Source File : NewGameFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            if (_newGame != null && _targetScene == Scene.AddSceneName && !Scene.IsOverlap && !Scene.IsNowLoadingFade)
            {
                var screenRect = GetFullscreenBrowserRect();
                IMGUIUtils.DrawSolidBox(screenRect);
                GUILayout.Window(362, screenRect, TreeWindow, "Select character folder");
                IMGUIUtils.EatInputInRect(screenRect);
            }
            else
            {
                _folderTreeView?.StopMonitoringFiles();
            }
        }

19 View Source File : MakerFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            var guiShown = false;
            // Check the opened category
            if (_catToggle != null && _catToggle.isOn && _targetScene == Scene.Instance.AddSceneName)
            {
                // Check opened tab
                if (_loadCharaToggle != null && _loadCharaToggle.isOn || _saveCharaToggle != null && _saveCharaToggle.isOn)
                {
                    // Check if the character picture take screen is displayed
                    if (_saveFront == null || !_saveFront.activeSelf)
                    {
                        if (_refreshList)
                        {
                            _folderTreeView.ResetTreeCache();
                            OnFolderChanged();
                            _refreshList = false;
                        }

                        var screenRect = new Rect((int)(Screen.width * 0.004), (int)(Screen.height * 0.57f), (int)(Screen.width * 0.125), (int)(Screen.height * 0.35));
                        IMGUIUtils.DrawSolidBox(screenRect);
                        GUILayout.Window(362, screenRect, TreeWindow, "Select character folder");
                        IMGUIUtils.EatInputInRect(screenRect);
                        _guiActive = guiShown = true;
                    }
                }
            }

            if (!guiShown && _guiActive)
            {
                _folderTreeView?.StopMonitoringFiles();
                _guiActive = false;
            }
        }

19 View Source File : ItemGiver.cs
License : MIT License
Project Creator : Astropilot

public static void DisplayGUI()
        {
            s_itemGiverRect = GUILayout.Window(1002, s_itemGiverRect, ItemGiverWindow, VTLocalization.instance.Localize("$vt_item_giver_replacedle"));
        }

19 View Source File : Inspector.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void DisplayInspector()
        {
            if (!Show) return;

            // Clean up dead tab contents
            foreach (var tab in _tabs.ToList())
            {
                while (tab.InspectorStack.Count > 0 && !tab.InspectorStack.Peek().EntryIsValid())
                {
                    RuntimeUnityEditorCore.Logger.Log(LogLevel.Message, $"[Inspector] Removed invalid/removed stack object: \"{tab.InspectorStack.Peek().Name}\"");
                    tab.Pop();
                }

                if (tab.InspectorStack.Count == 0) RemoveTab(tab);
            }

            _inspectorWindowRect = GUILayout.Window(_windowId, _inspectorWindowRect, InspectorWindow, "Inspector");
            InterfaceMaker.EatInputInRect(_inspectorWindowRect);
        }

19 View Source File : HOutfitFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            if (_uiObject && _uiObject.activeSelf && _sceneName == Manager.Scene.Instance.AddSceneName)
            {
                _guiActive = true;
                var screenRect = new Rect((int)(Screen.width * 0.04), (int)(Screen.height * 0.57f), (int)(Screen.width * 0.125), (int)(Screen.height * 0.35));
                IMGUIUtils.DrawSolidBox(screenRect);
                GUILayout.Window(362, screenRect, TreeWindow, "Select outfit folder");
                IMGUIUtils.EatInputInRect(screenRect);
            }
            else if (_guiActive)
            {
                _folderTreeView?.StopMonitoringFiles();
                _guiActive = false;
            }
        }

19 View Source File : CheatToolsWindow.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void DisplayCheatWindow()
        {
            if (!Show) return;

            var skinBack = GUI.skin;
            GUI.skin = InterfaceMaker.CustomSkin;

            _cheatWindowRect = GUILayout.Window(591, _cheatWindowRect, CheatWindowContents, _mainWindowreplacedle);

            InterfaceMaker.EatInputInRect(_cheatWindowRect);
            GUI.skin = skinBack;
        }

19 View Source File : ConsoleScript.cs
License : GNU General Public License v3.0
Project Creator : AndrasMumm

void OnGUI()
        {
            if (!isVisible)
            {
                return;
            }

            GUI.matrix = Matrix4x4.Scale(Vector3.one * scaleFactor);

            float width = (Screen.width / scaleFactor) - (margin * 2);
            float height = 250;//(Screen.height / scaleFactor) - (margin * 2);
            Rect windowRect = new Rect(windowX, windowY, width, height);

            GUI.backgroundColor = Color.black;
            Rect newWindowRect = GUILayout.Window(123456, windowRect, DrawWindow, windowreplacedle);
            windowX = newWindowRect.x;
            windowY = newWindowRect.y;
        }

19 View Source File : EntryPoint.cs
License : MIT License
Project Creator : Astropilot

public void OnGUI()
        {
            GUI.skin = InterfaceMaker.CustomSkin;

            if (_showMainWindow)
            {
                _valheimToolerRect = GUILayout.Window(1001, _valheimToolerRect, ValheimToolerWindow, VTLocalization.instance.Localize($"$vt_main_replacedle (v{_version})"), GUILayout.Height(10), GUILayout.Width(10));

                if (s_showItemGiver)
                {
                    ItemGiver.DisplayGUI();
                }
            }

            ESP.DisplayGUI();
        }

19 View Source File : WindowEditorTool.cs
License : MIT License
Project Creator : Crazy-Marvin

public virtual void OnWindowGUI(Rect viewRect)
		{
			if(!isShown && CanShow())
			{
				isShown = true;
				DoShow();
			}
			
			if(isShown && !CanShow())
			{
				isShown = false;
				DoHide();
			}

			if(CanShow())
			{
				windowRect = GUILayout.Window(windowID, windowRect, DoWindow, header);

				DoGUI();

				if(isHovered)
				{
					int controlID = GUIUtility.GetControlID("WindowHovered".GetHashCode(), FocusType.Preplacedive);
					
					if(Event.current.GetTypeForControl(controlID) == EventType.Layout)
					{
						HandleUtility.AddControl(controlID,0f);
					}
				}
			}
		}

19 View Source File : MakerHPoseIKFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            if (_motionIKUI != null && _targetScene == Scene.Instance.AddSceneName)
            {
                if (_refreshList) _refreshList = false;

                var screenRect = new Rect((int)(Screen.width * 0.004), (int)(Screen.height * 0.57f),
                    (int)(Screen.width * 0.125), (int)(Screen.height * 0.35));
                IMGUIUtils.DrawSolidBox(screenRect);
                GUILayout.Window(362, screenRect, TreeWindow, "Select hik folder");
                IMGUIUtils.EatInputInRect(screenRect);
            }
        }

19 View Source File : MakerOutfitFolders.cs
License : GNU General Public License v3.0
Project Creator : ManlyMarco

public void OnGui()
        {
            //todo  When loading a coordinate it resets to the main folder without deselect in menu
            var visibleWindow = IsVisible();
            if (visibleWindow == VisibleWindow.None)
            {
                _lastRefreshed = VisibleWindow.None;
                if (_guiActive)
                {
                    _folderTreeView?.StopMonitoringFiles();
                    _guiActive = false;
                }
                return;
            }

            _guiActive = true;
            if (_lastRefreshed != visibleWindow) RefreshCurrentWindow();

            var screenRect = MakerFolders.GetDisplayRect();
            IMGUIUtils.DrawSolidBox(screenRect);
            GUILayout.Window(362, screenRect, TreeWindow, "Select clothes folder");
            IMGUIUtils.EatInputInRect(screenRect);
        }

See More Examples