示例#1
0
 public void Draw()
 {
     foreach (var el in List)
     {
         el.Draw();
         if (_space != null)
         {
             _space.Draw();
         }
     }
 }
        private void DrawSupportBar()
        {
            if (_supportBar == null)
            {
                _supportBar = GuiElementsFactory.CreateLayoutTemplateBarWithLeftAndRightAnchors();

                var leftAnchor = _supportBar.GetChild <GuiListElements>("LeftAnchor");
                leftAnchor.Add(GuiElementsFactory.CreateLayoutButtonWithMiniLabelStyle("v" + Version.Current, null));

                var rightAnchor = _supportBar.GetChild <GuiListElements>("RightAnchor");
                rightAnchor.Add(
                    GuiElementsFactory.CreateLayoutButtonWithMiniLabelStyle(
                        "Read me",
                        () =>
                {
                    Application.OpenURL(
                        @"https://github.com/FoxsterDev/SKTools.MenuItemsFinder/blob/master/README.md");
                }))
                .Add(
                    GuiElementsFactory.CreateLayoutButtonWithMiniLabelStyle(
                        "Ask me in Skype",
                        () => { Application.OpenURL("skype:cachbroker?chat"); }))
                .Add(
                    GuiElementsFactory.CreateLayoutButtonWithMiniLabelStyle(
                        "Trello Board",
                        () => { Application.OpenURL("https://trello.com/b/7wgcSwgt/sktoolsmenuitemsfinder"); }))
                .Add(
                    GuiElementsFactory.CreateLayoutButtonWithMiniLabelStyle(
                        "Rate Me",
                        () =>
                {
                    var rateMeAsset  = _target.Assets.Get <TextAsset>("RateMeConfig");
                    var rateMeConfig = new RateMeConfig(rateMeAsset.text);
                    RateMe.Show(rateMeConfig);
                }));
            }

            _supportBar.Draw();
        }
        private void DrawMenuBar()
        {
            _prefs.ShowMenuBar = EditorGUILayout.Foldout(_prefs.ShowMenuBar, "Menu");
            if (_prefs.ShowMenuBar)
            {
                if (_menuBar == null)
                {
                    _menuBar = new GuiLayoutHorizontal(
                        new GuiListElements(
                            GuiElementsFactory.CreateLayoutToggleWithFixedWidth(
                                "Hide Unity Items",
                                v => { _prefs.HideUnityItems = v; }, () => _prefs.HideUnityItems, 120),
                            GuiElementsFactory.CreateLayoutToggleWithFixedWidth(
                                "Show Only Starred",
                                v => { _prefs.ShowOnlyStarred = v; }, () => _prefs.ShowOnlyStarred, 120),
                            GuiElementsFactory.CreateLayoutToggleWithFixedWidth(
                                "Hide Missed Items",
                                v => { _prefs.HideAllMissed = v; }, () => _prefs.HideAllMissed, 120)
                            ));
                }

                _menuBar.Draw();
            }
        }
示例#4
0
 public void Draw()
 {
     GUILayout.BeginHorizontal();
     Element.Draw();
     GUILayout.EndHorizontal();
 }