void DrawControlPanel()
        {
            QUI.DrawTexture(DUIResources.headerControlPanel.texture, 552, 64);
            float sectionWidth     = PAGE_WIDTH - SIDE_BAR_SHADOW_WIDTH * 2;
            float leftColumnWidth  = 242;
            float rightColumnWidth = 310;

            QUI.BeginHorizontal(sectionWidth);
            {
                QUI.BeginVertical(leftColumnWidth);
                {
                    DrawControlPanelSpportFor3RdPartyAssets(leftColumnWidth);
                    QUI.Space(8);
                    DrawControlPanelDoozyModules(leftColumnWidth);
                    QUI.Space(8);
                    DrawControlPanelRecomendedPlugins(leftColumnWidth);
                    QUI.FlexibleSpace();
                }
                QUI.EndVertical();
                QUI.Space(SPACE_16);
                QUI.BeginVertical(rightColumnWidth);
                {
                    DrawControlPanelNews(rightColumnWidth);
                    QUI.FlexibleSpace();
                }
                QUI.EndVertical();
            }
            QUI.EndHorizontal();
        }
Beispiel #2
0
 void DrawSelectedPresetsList(float width)
 {
     if (presetSymbols == null || presetSymbols.Count == 0)
     {
         presetSymbols = new List <string> {
             ""
         };
     }
     QUI.BeginVertical(width);
     {
         presetSymbolsReordableList.DoLayoutList();
         QUI.Space(-EditorGUIUtility.singleLineHeight - 3);
         QUI.BeginHorizontal(width);
         {
             QUI.FlexibleSpace();
             if (QUI.ButtonPlus())
             {
                 presetSymbols.Add("");
             }
             QUI.Space(-SPACE_2);
         }
         QUI.EndHorizontal();
     }
     QUI.EndVertical();
 }
Beispiel #3
0
        //————————————————————————————————————



        void DrawSocialButtons()                                 // 按钮1  按钮2
        {
            if (mWindowSettings.sidebarIsExpanded.faded < 0.3f)
            {
                QUI.BeginVertical(mWindowSettings.SidebarCurrentWidth, mWindowSettings.sidebarButtonHeight * 3);
            }
            else
            {
                QUI.BeginHorizontal(mWindowSettings.SidebarCurrentWidth, mWindowSettings.sidebarButtonHeight);
            }
            int btnNum = 2;

            tempLabel = mWindowSettings.sidebarIsExpanded.faded < 0.8f ? "" : (isNeedTu? "去图" : "加图");
            if (QUI.Button(tempLabel,
                           EZStyles.GetStyle(EZStyles.General.SideButtonTwitter),
                           mWindowSettings.sidebarExpandedWidth / btnNum >= mWindowSettings.SidebarCurrentWidth ? mWindowSettings.SidebarCurrentWidth : mWindowSettings.SidebarCurrentWidth / btnNum, mWindowSettings.sidebarButtonHeight))
            {
                isNeedTu = !isNeedTu;
            }
            tempLabel = mWindowSettings.sidebarIsExpanded.faded < 0.8f ? "" : "退出";
            if (QUI.Button(tempLabel, EZStyles.GetStyle(EZStyles.General.SideButtonBlue), mWindowSettings.sidebarExpandedWidth / btnNum >= mWindowSettings.SidebarCurrentWidth ? mWindowSettings.SidebarCurrentWidth : mWindowSettings.SidebarCurrentWidth / btnNum, mWindowSettings.sidebarButtonHeight))
            {
                OnClickBtn2();
            }
            QUI.FlexibleSpace();

            if (mWindowSettings.sidebarIsExpanded.faded < 0.3f)
            {
                QUI.EndVertical();
            }
            else
            {
                QUI.EndHorizontal();
            }
        }
        void DrawPageHeader(string title, QColor titleColor, string subtitle, QColor subtitleColor, QTexture iconQTexture)
        {
            QUI.Space(SPACE_2);
            QUI.Box(QStyles.GetBackgroundStyle(Style.BackgroundType.Low, QColors.Color.Gray), WindowSettings.CurrentPageContentWidth + WindowSettings.pageShadowWidth, WindowSettings.pageHeaderHeight);
            QUI.Space(-WindowSettings.pageHeaderHeight + (WindowSettings.pageHeaderHeight - WindowSettings.pageHeaderHeight * 0.8f) / 2);
            QUI.BeginHorizontal(WindowSettings.CurrentPageContentWidth + WindowSettings.pageShadowWidth, WindowSettings.pageHeaderHeight * 0.8f);
            {
                QUI.Space((WindowSettings.pageHeaderHeight - WindowSettings.pageHeaderHeight * 0.8f));
                QUI.BeginVertical((WindowSettings.CurrentPageContentWidth + WindowSettings.pageShadowWidth) / 2, WindowSettings.pageHeaderHeight * 0.8f);
                {
                    QUI.FlexibleSpace();
                    if (!title.IsNullOrEmpty())
                    {
                        QUI.Space(-SPACE_2);
                        QUI.SetGUIColor(titleColor.Color);
                        QUI.Label(title, PageHeaderTitleStyle, (WindowSettings.CurrentPageContentWidth + WindowSettings.pageShadowWidth) / 2, 26);
                        QUI.ResetColors();
                    }

                    if (!subtitle.IsNullOrEmpty())
                    {
                        QUI.Space(-SPACE_2);
                        QUI.SetGUIColor(subtitleColor.Color);
                        QUI.Label(subtitle, PageHeaderSubtitleStyle, (WindowSettings.CurrentPageContentWidth + WindowSettings.pageShadowWidth) / 2, 18);
                        QUI.ResetColors();
                    }
                    QUI.FlexibleSpace();
                }
                QUI.EndVertical();
                QUI.FlexibleSpace();
                QUI.DrawTexture(iconQTexture.texture, WindowSettings.pageHeaderHeight * 0.8f, WindowSettings.pageHeaderHeight * 0.8f);
                QUI.Space((WindowSettings.pageHeaderHeight - WindowSettings.pageHeaderHeight * 0.8f) / 2);
            }
            QUI.EndHorizontal();
        }
Beispiel #5
0
        void DrawHelp()
        {
            QUI.DrawTexture(DUIResources.headerHelp.texture, 552, 64);
            float sectionWidth     = PAGE_WIDTH - SIDE_BAR_SHADOW_WIDTH * 2;
            float leftColumnWidth  = 242;
            float rightColumnWidth = 310;

            QUI.BeginHorizontal(sectionWidth);
            {
                QUI.BeginVertical(leftColumnWidth);
                {
                    DrawHelpButtons(leftColumnWidth);
                    QUI.Space(8);
                    QUI.FlexibleSpace();
                }
                QUI.EndVertical();
                QUI.Space(SPACE_16);
                QUI.BeginVertical(rightColumnWidth);
                {
                    DrawFAQ(rightColumnWidth);
                    QUI.FlexibleSpace();
                }
                QUI.EndVertical();
            }
            QUI.EndHorizontal();
        }
Beispiel #6
0
 void DrawNewsArticle(List <NewsArticleData> articles, int index, Object targetObject, bool showDeleteButton, float width)
 {
     QLabel.text  = articles[index].title;
     QLabel.style = Style.Text.Subtitle;
     QUI.Box(QStyles.GetBackgroundStyle(Style.BackgroundType.Low, QColors.Color.Gray), width, 20);
     QUI.Space(-20);
     QUI.BeginHorizontal(width);
     {
         QUI.Space(6);
         QUI.Label(QLabel);
         QUI.FlexibleSpace();
         if (showDeleteButton)
         {
             if (QUI.ButtonMinus())
             {
                 if (QUI.DisplayDialog("Delete Article", "Delete the '" + QLabel.text + "' article?", "Ok", "Cancel"))
                 {
                     articles.RemoveAt(index);
                     QUI.SetDirty(targetObject);
                     AssetDatabase.SaveAssets();
                     QUI.ExitGUI();
                 }
             }
         }
         QUI.Space(SPACE_4);
     }
     QUI.EndHorizontal();
     QLabel.text  = articles[index].content;
     QLabel.style = Style.Text.Normal;
     QUI.Space(-8 + (showDeleteButton ? 2 : 0));
     EditorGUILayout.LabelField(articles[index].content, QStyles.GetInfoMessageMessageStyle(Style.InfoMessage.Help), GUILayout.Width(width));
     QUI.Space(SPACE_4);
 }
        void DrawSettings(float width)
        {
            QUI.Space(SPACE_2);
            QUI.BeginHorizontal(width);
            {
                QUI.QToggle("play on awake", playOnAwake, 20);
                QUI.FlexibleSpace();

                QUI.QToggle("stop instantly on hide", stopInstantly, 20);
                QUI.FlexibleSpace();

                QLabel.text  = "start delay on show";
                QLabel.style = Style.Text.Normal;
                QUI.Box(QStyles.GetBackgroundStyle(Style.BackgroundType.Low, startDelay.floatValue != 0 ? QColors.Color.Blue : QColors.Color.Gray), 4 + QLabel.x + 40 + 16, 20);
                QUI.Space(-(QLabel.x + 40 + 16));
                QUI.BeginVertical(QLabel.x, QUI.SingleLineHeight);
                {
                    QUI.Space(1);
                    QUI.Label(QLabel);
                }
                QUI.EndVertical();
                QUI.PropertyField(startDelay, 40);
                QUI.Space(SPACE_4);
            }
            QUI.EndHorizontal();
        }
 void DrawControlPanelGeneralOptionalModules(float width)
 {
     QUI.BeginVertical(width);
     {
         QLabel.text  = "Optional Modules Integration";
         QLabel.style = Style.Text.Tiny;
         QUI.BeginHorizontal(width);
         {
             QUI.FlexibleSpace();
             QUI.Label(QLabel);
             QUI.FlexibleSpace();
         }
         QUI.EndHorizontal();
         QUI.Space(SPACE_2);
         DrawControlPanelGeneralButton("UIDrawer", buttonStyleUIDrawer, DUI.UIDrawerEnabled, DUI.SYMBOL_UIDRAWER, width, false, true);
         if (!DUI.UIDrawerEnabled)
         {
             QUI.Space(SPACE_2);
             QUI.LinkButton("Asset Store Link", "http://u3d.as/16SE", Style.LinkButton.Unity, true);
         }
         QUI.Space(SPACE_2);
         QUI.LinkButton("UIDrawer - Owner's Manual", "https://goo.gl/6S3Gik", Style.LinkButton.Manual, true);
     }
     QUI.EndVertical();
 }
        void DrawTargetParticleSystem(float width)
        {
            QUI.Box(QStyles.GetBackgroundStyle(Style.BackgroundType.Low, uiEffect.targetParticleSystem == null ? QColors.Color.Red : QColors.Color.Blue), width, 20);
            QUI.Space(-20);

            QLabel.text  = "Target ParticleSystem";
            QLabel.style = Style.Text.Normal;

            QUI.BeginHorizontal(width);
            {
                QUI.Space(SPACE_4);
                QUI.BeginVertical(QLabel.x, QUI.SingleLineHeight);
                {
                    QUI.Label(QLabel);
                    QUI.Space(1);
                }
                QUI.EndVertical();
                QUI.PropertyField(targetParticleSystem, width - QLabel.x - 20);
                QUI.FlexibleSpace();
                QUI.Space(SPACE_8);
            }
            QUI.EndHorizontal();

            infoMessage["ParticleSystemDisabled"].show.target = uiEffect.targetParticleSystem == null;
            DrawInfoMessage("ParticleSystemDisabled", GlobalWidth);

            QUI.Space(SPACE_4 * infoMessage["ParticleSystemDisabled"].show.faded);
        }
        void DrawButtonCategory(float width)
        {
            QUI.BeginHorizontal(width);
            {
                if (EditorApplication.isPlayingOrWillChangePlaymode)
                {
                    QLabel.text  = buttonCategory.stringValue;
                    QLabel.style = Style.Text.Help;
                    QUI.Label(QLabel);
                }
                else
                {
                    buttonCategoryIndex = DatabaseUIButtons.CategoryNameIndex(buttonCategory.stringValue); //set the index
                    QUI.BeginChangeCheck();
                    buttonCategoryIndex = EditorGUILayout.Popup(buttonCategoryIndex, DatabaseUIButtons.categoryNames.ToArray(), GUILayout.Width(width - 5));
                    if (QUI.EndChangeCheck())
                    {
                        buttonCategory.stringValue = DatabaseUIButtons.categoryNames[buttonCategoryIndex];
                        if (buttonCategory.stringValue == DUI.CUSTOM_NAME)
                        {
                            buttonNameIndex = -1;
                        }
                    }
                }

                QUI.FlexibleSpace();
            }
            QUI.EndHorizontal();
        }
Beispiel #11
0
        void DrawSideBar()                                       // 画左边
        {
            bool isEasy = OnIsEasy();

            QUI.BeginVertical(mWindowSettings.SidebarCurrentWidth);
            {
                DrawSideBarLogo();
                if (!isEasy)
                {
                    DrawBtnExpandCollapseSideBar();
                }
                else
                {
                    AddSpace_3();
                }
                QUI.Space(mWindowSettings.sidebarVerticalSpacing);
                DrawLeft();
                QUI.FlexibleSpace();
                if (!isEasy)
                {
                    DrawSocialButtons();
                }
            }
            QUI.EndVertical();
        }
Beispiel #12
0
        void DrawSettings(float width)
        {
            QUI.QToggle("Auto disable Button Clicks when an UIElement is in trasition", autoDisableButtonClicks);

            QUI.Space(SPACE_4);

            //CONTROLLER INPUT MODE
            QUI.BeginHorizontal(width);
            {
                if ((ControllerInputMode)backButtonInputMode.enumValueIndex == ControllerInputMode.None)
                {
                    QUI.SetGUIBackgroundColor(QUI.AccentColorRed);
                }
                QUI.QObjectPropertyField("'Back' button Input Mode", backButtonInputMode, 260, 20, false);
                QUI.ResetColors();
                QUI.Space(SPACE_2);
                if ((ControllerInputMode)backButtonInputMode.enumValueIndex != ControllerInputMode.None)
                {
                    QUI.QToggle("enable alternate inputs", enableBackButtonAlternateInputs);
                }
                QUI.FlexibleSpace();
            }
            QUI.EndHorizontal();
            if ((ControllerInputMode)backButtonInputMode.enumValueIndex != ControllerInputMode.None)
            {
                QUI.BeginHorizontal(width);
                {
                    if ((ControllerInputMode)backButtonInputMode.enumValueIndex == ControllerInputMode.KeyCode)
                    {
                        QUI.QObjectPropertyField("Key Code", backButtonKeyCode, width / 2 - 1, 20, false);
                        QUI.Space(SPACE_2);
                        GUI.enabled = enableBackButtonAlternateInputs.boolValue;
                        if (!enableBackButtonAlternateInputs.boolValue)
                        {
                            QUI.SetGUIBackgroundColor(QUI.AccentColorRed);
                        }
                        QUI.QObjectPropertyField("Alternate", backButtonKeyCodeAlt, width / 2 - 1, 20, false);
                        QUI.ResetColors();
                        GUI.enabled = true;
                    }
                    else if ((ControllerInputMode)backButtonInputMode.enumValueIndex == ControllerInputMode.VirtualButton)
                    {
                        QUI.QObjectPropertyField("Virtual Button", backButtonVirtualButtonName, width / 2 - 1, 20, false);
                        QUI.Space(SPACE_2);
                        GUI.enabled = enableBackButtonAlternateInputs.boolValue;
                        if (!enableBackButtonAlternateInputs.boolValue)
                        {
                            QUI.SetGUIBackgroundColor(QUI.AccentColorRed);
                        }
                        QUI.QObjectPropertyField("Alternate", backButtonVirtualButtonNameAlt, width / 2 - 1, 20, false);
                        QUI.ResetColors();
                        GUI.enabled = true;
                    }
                    QUI.FlexibleSpace();
                }
                QUI.EndHorizontal();
            }
        }
        void DrawPair(string title,
                      string firstLabel, SerializedProperty firstProperty, string firstDefaultValue,
                      string secondLabel, SerializedProperty secondProperty, string secondDefaultValue,
                      float width, bool isSingle = false)
        {
            QUI.Box(QStyles.GetBackgroundStyle(Style.BackgroundType.Low, QColors.Color.Purple), width, 18);
            QUI.Space(-18);

            QUI.Box(QStyles.GetBackgroundStyle(Style.BackgroundType.Low, QColors.Color.Purple), width, isSingle ? 42 : 60);
            QUI.Space(isSingle ? -44 : -62);

            QLabel.text  = title;
            QLabel.style = Style.Text.Normal;
            QUI.BeginHorizontal(width);
            {
                QUI.Space(6);
                QUI.Label(QLabel);
                QUI.FlexibleSpace();
            }
            QUI.EndHorizontal();

            QUI.Space(SPACE_2);

            QUI.BeginHorizontal(width);
            {
                QUI.Space(12);
                QLabel.text  = firstLabel;
                QLabel.style = Style.Text.Small;
                QUI.Label(QLabel);
                QUI.PropertyField(firstProperty);
                if (QUI.ButtonReset())
                {
                    firstProperty.stringValue = firstDefaultValue;
                }
                QUI.Space(6);
            }
            QUI.EndHorizontal();

            if (isSingle)
            {
                return;
            }

            QUI.BeginHorizontal(width);
            {
                QUI.Space(12);
                QLabel.text  = secondLabel;
                QLabel.style = Style.Text.Small;
                QUI.Label(QLabel);
                QUI.PropertyField(secondProperty);
                if (QUI.ButtonReset())
                {
                    secondProperty.stringValue = secondDefaultValue;
                }
                QUI.Space(6);
            }
            QUI.EndHorizontal();
        }
 void DrawDetectGestures(float width)
 {
     QUI.BeginHorizontal(width);
     {
         QUI.QToggle("Detect Gestures", detectGestures);
         QUI.FlexibleSpace();
     }
     QUI.EndHorizontal();
 }
        void DrawButtonNameOptions(float width)
        {
            if (!triggerOnButtonClick.boolValue &&
                !triggerOnButtonDoubleClick.boolValue &&
                !triggerOnButtonLongClick.boolValue)
            {
                return;
            }

            gameEvent.stringValue = string.Empty;

            DrawDatabaseButtons(width);

            QUI.Space(SPACE_4);

            QUI.BeginHorizontal(width);
            {
                QUI.QToggle("dispatch all", dispatchAll);
                QUI.FlexibleSpace();
            }
            QUI.EndHorizontal();

            QUI.Space(SPACE_2);

            if (dispatchAll.boolValue)
            {
                gameEvent.stringValue = string.Empty;
            }

            QUI.Space(-SPACE_8 * dispatchAllAnimBool.faded);

            if (QUI.BeginFadeGroup((1 - dispatchAllAnimBool.faded)))
            {
                QUI.BeginVertical(width);
                {
                    DrawButtonCategoryAndButtonName(width);
                }
                QUI.EndVertical();
            }
            QUI.EndFadeGroup();

            QUI.Space(SPACE_2);

            infoMessage["SetButtonName"].show.target = (string.IsNullOrEmpty(buttonName.stringValue) || buttonName.stringValue.Equals(DUI.DEFAULT_BUTTON_NAME)) && !dispatchAll.boolValue;
            DrawInfoMessage("SetButtonName", GlobalWidth);

            infoMessage["DispatchAllButtonClicks"].show.target = triggerOnButtonClick.boolValue && dispatchAll.boolValue;
            DrawInfoMessage("DispatchAllButtonClicks", GlobalWidth);

            infoMessage["DispatchAllDoubleButtonClicks"].show.target = triggerOnButtonDoubleClick.boolValue && dispatchAll.boolValue;
            DrawInfoMessage("DispatchAllDoubleButtonClicks", GlobalWidth);

            infoMessage["DispatchAllLongButtonClicks"].show.target = triggerOnButtonLongClick.boolValue && dispatchAll.boolValue;
            DrawInfoMessage("DispatchAllLongButtonClicks", GlobalWidth);
        }
        public override void OnInspectorGUI()
        {
            DrawHeader(DUIResources.headerGestureDetector.texture, WIDTH_420, HEIGHT_42);

            serializedObject.Update();

            QUI.QToggle("debug", debug);
            QUI.Space(SPACE_2);
            QUI.QToggle("is Global Gesture Detector", isGlobalGestureDetector);
            QUI.Space(SPACE_2);
            showTarget.target = !isGlobalGestureDetector.boolValue;
            if (QUI.BeginFadeGroup(showTarget.faded))
            {
                QUI.BeginHorizontal(GlobalWidth);
                {
                    GUI.enabled = overrideTarget.boolValue;
                    QUI.QObjectPropertyField("Target GameObject", targetGameObject, GlobalWidth - 100);
                    GUI.enabled = true;
                    QUI.Space(SPACE_2);
                    QUI.QToggle("override", overrideTarget, 20);
                }
                QUI.EndHorizontal();
            }
            QUI.EndFadeGroup();
            QUI.Space(SPACE_2);
            showSwipeDirection.target = (GestureType)gestureType.enumValueIndex == GestureType.Swipe;
            QUI.BeginHorizontal(GlobalWidth);
            {
                QUI.QObjectPropertyField("Gesture Type", gestureType, ((GlobalWidth - SPACE_2) / 2), 20, false);
                QUI.Space(SPACE_2);
                if (showSwipeDirection.faded > 0.2f)
                {
                    QUI.QObjectPropertyField("Swipe Direction", swipeDirection, ((GlobalWidth - SPACE_2) / 2) * showSwipeDirection.faded, 20, false);
                }
                QUI.FlexibleSpace();
            }
            QUI.EndHorizontal();
            QUI.Space(SPACE_2);
            switch ((GestureType)gestureType.enumValueIndex)
            {
            case GestureType.Tap: DUIUtils.DrawUnityEvents(gestureDetector.OnTap.GetPersistentEventCount() > 0, showOnTap, OnTap, "OnTap", GlobalWidth, MiniBarHeight); break;

            case GestureType.LongTap: DUIUtils.DrawUnityEvents(gestureDetector.OnLongTap.GetPersistentEventCount() > 0, showOnLongTap, OnLongTap, "OnLongTap", GlobalWidth, MiniBarHeight); break;

            case GestureType.Swipe: DUIUtils.DrawUnityEvents(gestureDetector.OnSwipe.GetPersistentEventCount() > 0, showOnSwipe, OnSwipe, "OnSwipe", GlobalWidth, MiniBarHeight); break;
            }
            QUI.Space(SPACE_2);
            QUI.DrawCollapsableList("Game Events", showGameEventsAnimBool, gameEvents.arraySize > 0 ? QColors.Color.Blue : QColors.Color.Gray, gameEvents, GlobalWidth, 18, "Not sending any Game Events on gesture... Click [+] to start...");
            QUI.Space(SPACE_2);
            DUIUtils.DrawNavigation(target, gestureDetector.navigationPointerData, editorNavigationData, showNavigation, UpdateAllNavigationData, true, false, GlobalWidth, MiniBarHeight);

            serializedObject.ApplyModifiedProperties();
            QUI.Space(SPACE_4);
        }
 void DrawDebug(float width)
 {
     QUI.BeginHorizontal(width);
     {
         QUI.QToggle("Debug Drawer", debugDrawer);
         QUI.Space(SPACE_4);
         QUI.QToggle("Debug Events", debugEvents);
         QUI.FlexibleSpace();
     }
     QUI.EndHorizontal();
 }
 void DrawDispatcherSelector()
 {
     QUI.BeginHorizontal(WIDTH_420);
     {
         QLabel.text  = "Dispatch";
         QLabel.style = Style.Text.Normal;
         QUI.Label(QLabel);
         QUI.QToggle("Game Events", dispatchGameEvents);
         QUI.QToggle("Button Clicks", dispatchButtonClicks);
         QUI.FlexibleSpace();
     }
     QUI.EndHorizontal();
 }
Beispiel #19
0
 void DrawBackground()
 {
     QUI.BeginHorizontal();
     {
         QUI.DrawTexture(DUIResources.backgroundGrey230.texture, SIDE_BAR_WIDTH, position.height);
         QUI.Space(-SIDE_BAR_WIDTH);
         QUI.DrawTexture(DUIResources.backgroundGrey242ShadowLeft.texture, SIDE_BAR_SHADOW_WIDTH, position.height);
         QUI.Space(-SIDE_BAR_WIDTH * 2 + SIDE_BAR_SHADOW_WIDTH);
         QUI.DrawTexture(DUIResources.backgroundGrey242.texture, PAGE_WIDTH, position.height);
         QUI.FlexibleSpace();
     }
     QUI.EndHorizontal();
 }
 void DrawMissingModuleAd(Texture texture, List <LinkButtonData> list, float width = 656, float height = 608)
 {
     QUI.Space(SPACE_16);
     QUI.DrawTexture(texture, width, height);
     QUI.Space(-height);
     QUI.BeginVertical(width, height);
     {
         QUI.FlexibleSpace();
         QUI.DrawLinkButtonsList(list);
         QUI.Space(SPACE_16);
     }
     QUI.EndVertical();
 }
Beispiel #21
0
        void DrawDefineSymbolsBuildTargetGroup(float width)
        {
            QUI.BeginVertical(width);
            {
                QUI.GhostTitle("BUILD TARGET GROUP", QColors.Color.Blue, width);
                QUI.Space(SPACE_4);
                QUI.BeginHorizontal(width);
                {
                    QUI.Space(SPACE_8);
                    if (QUI.GhostButton("Copy to Symbols Preset   >>>", QColors.Color.Blue, width - SPACE_8, 24))
                    {
                        presetSymbols.Clear();
                        presetSymbols.AddRange(symbols);
                    }
                    QUI.FlexibleSpace();
                }
                QUI.EndHorizontal();
                QUI.Space(SPACE_4);
                QUI.BeginHorizontal(width);
                {
                    QUI.Space(SPACE_8);
                    QUI.SetGUIBackgroundColor(EditorGUIUtility.isProSkin ? QColors.Blue.Color : QColors.BlueLight.Color);
                    selectedBuildTargetGroup = (BuildTargetGroup)EditorGUILayout.EnumPopup(selectedBuildTargetGroup, GUILayout.Width(width - SPACE_8 - (106 * selectedBuildTargetGroupIsTheActivePlatform.faded)));
                    QUI.ResetColors();
                    if (selectedBuildTargetGroupIsTheActivePlatform.faded > 0.05f)
                    {
                        QUI.Label("is the Active Platform", Style.Text.Small, 106 * selectedBuildTargetGroupIsTheActivePlatform.faded);
                    }
                    QUI.FlexibleSpace();
                }
                QUI.EndHorizontal();

                if (selectedBuildTargetGroup != previouslySelectedBuildTargetGroup)
                {
                    symbols = QUtils.GetScriptingDefineSymbolsForGroup(selectedBuildTargetGroup);
                    previouslySelectedBuildTargetGroup = selectedBuildTargetGroup;
                    Repaint();
                }

                QUI.Space(SPACE_8 + SPACE_16);

                QUI.BeginHorizontal(width);
                {
                    QUI.Space(SPACE_8);
                    DrawActiveSymbolsList(width - 26);
                    QUI.FlexibleSpace();
                }
                QUI.EndHorizontal();
            }
            QUI.EndVertical();
        }
Beispiel #22
0
 void DrawSideBar()
 {
     QUI.BeginVertical(300);
     {
         DrawSideBarLogo();
         DrawSideBarGeneral();
         DrawSideBarDatabases();
         DrawSideBarSystem();
         DrawSideBarHelp();
         QUI.FlexibleSpace();
         DrawSideBarSocial();
     }
     QUI.EndVertical();
 }
        void DrawFixFolderButton(string folderName, string relativePath, float width)
        {
            QUI.BeginHorizontal(width);
            {
                QLabel.text  = "Find";
                QLabel.style = Style.Text.Button;
                if (QUI.GhostButton(QLabel.text, QColors.Color.Gray, QLabel.x + 16, 18))
                {
                    // Load object
                    UnityEngine.Object obj = AssetDatabase.LoadAssetAtPath(relativePath.Substring(0, relativePath.Length - 1), typeof(UnityEngine.Object));

                    // Select the object in the project folder
                    Selection.activeObject = obj;

                    // Also flash the folder yellow to highlight it
                    EditorGUIUtility.PingObject(obj);
                }

                QUI.Space(SPACE_2);

                QLabel.text  = "Fix Folder: " + folderName;
                QLabel.style = Style.Text.Button;
                if (QUI.GhostButton(QLabel.text, QColors.Color.Gray, QLabel.x + 24, 18))
                {
                    DeleteAllFilesUnderTargetPath(relativePath);
                }

                if (CheckThatFolderExists(relativePath))
                {
                }
                else if (CheckThatFolderIsEmpty(relativePath))
                {
                }
                else
                {
                    QUI.Space(SPACE_4);
                    QUI.BeginVertical(16, 16);
                    {
                        QUI.Space(2);
                        QUI.DrawTexture(QResources.iconOk.texture, 14, 14);
                    }
                    QUI.EndVertical();
                }

                QUI.FlexibleSpace();
            }
            QUI.EndHorizontal();
        }
 void DrawSideBarSocial()
 {
     if (WindowSettings.sidebarIsExpanded.faded < 0.3f)
     {
         QUI.BeginVertical(WindowSettings.SidebarCurrentWidth, WindowSettings.sidebarButtonHeight * 3);
     }
     else
     {
         QUI.BeginHorizontal(WindowSettings.SidebarCurrentWidth, WindowSettings.sidebarButtonHeight);
     }
     {
         tempLabel = WindowSettings.sidebarIsExpanded.faded < 0.8f ? "" : "Twitter";
         if (QUI.Button(tempLabel, DUIStyles.GetStyle(DUIStyles.SideButton.Twitter), WindowSettings.sidebarExpandedWidth / 3 >= WindowSettings.SidebarCurrentWidth ? WindowSettings.SidebarCurrentWidth : WindowSettings.SidebarCurrentWidth *TWITTER_BUTTON_WIDTH_PERCENTAGE, WindowSettings.sidebarButtonHeight))
         {
             Application.OpenURL("https://twitter.com/doozyplay");
         }
         if (WindowSettings.sidebarExpandedWidth / 3 < WindowSettings.SidebarCurrentWidth)
         {
             QUI.FlexibleSpace();
         }
         tempLabel = WindowSettings.sidebarIsExpanded.faded < 0.8f ? "" : "Facebook";
         if (QUI.Button(tempLabel, DUIStyles.GetStyle(DUIStyles.SideButton.Facebook), WindowSettings.sidebarExpandedWidth / 3 >= WindowSettings.SidebarCurrentWidth ? WindowSettings.SidebarCurrentWidth : WindowSettings.SidebarCurrentWidth *FACEBOOK_BUTTON_WIDTH_PERCENTAGE, WindowSettings.sidebarButtonHeight))
         {
             Application.OpenURL("https://www.facebook.com/doozyentertainment");
         }
         if (WindowSettings.sidebarExpandedWidth / 3 < WindowSettings.SidebarCurrentWidth)
         {
             QUI.FlexibleSpace();
         }
         tempLabel = WindowSettings.sidebarIsExpanded.faded < 0.8f ? "" : "YouTube";
         if (QUI.Button(tempLabel, DUIStyles.GetStyle(DUIStyles.SideButton.Youtube), WindowSettings.sidebarExpandedWidth / 3 >= WindowSettings.SidebarCurrentWidth ? WindowSettings.SidebarCurrentWidth : WindowSettings.SidebarCurrentWidth *YOUTUBE_BUTTON_WIDTH_PERCENTAGE, WindowSettings.sidebarButtonHeight))
         {
             Application.OpenURL("http://www.youtube.com/c/DoozyEntertainment");
         }
         if (WindowSettings.sidebarExpandedWidth / 3 >= WindowSettings.SidebarCurrentWidth)
         {
             QUI.FlexibleSpace();
         }
     }
     if (WindowSettings.sidebarIsExpanded.faded < 0.3f)
     {
         QUI.EndVertical();
     }
     else
     {
         QUI.EndHorizontal();
     }
 }
 void DrawOverlay(float width)
 {
     QUI.QObjectPropertyField("Overlay", overlay, width, 20, true);
     QUI.BeginHorizontal(width);
     {
         QLabel.text  = "When Closed";
         QLabel.style = Style.Text.Small;
         QUI.LabelWithBackground(QLabel);
         QUI.Space(SPACE_4);
         QUI.QToggle("Disable", disableOverlayWhenClosed);
         QUI.Space(SPACE_4);
         QUI.QToggle("Dont Disable Canvas", dontDisableOverlayCanvasWhenClosed);
         QUI.FlexibleSpace();
     }
     QUI.EndHorizontal();
 }
Beispiel #26
0
 void DrawDebugOptions(float width)
 {
     QUI.BeginHorizontal(width);
     {
         QUI.LabelWithBackground("Debug");
         QUI.FlexibleSpace();
         QUI.QToggle("GameEvents", debugGameEvents, Style.Text.Small);
         QUI.FlexibleSpace();
         QUI.QToggle("UIButtons", debugUIButtons, Style.Text.Small);
         QUI.FlexibleSpace();
         QUI.QToggle("UIElements", debugUIElements, Style.Text.Small);
         QUI.FlexibleSpace();
         QUI.QToggle("UINotifications", debugUINotifications, Style.Text.Small);
     }
     QUI.EndHorizontal();
 }
Beispiel #27
0
 void DrawPages()                                         // 画右边
 {
     DrawRightSize();
     GUI.skin           = LoadRes.ResourcesSkin;
     PageScrollPosition = QUI.BeginScrollView(PageScrollPosition);
     {
         QUI.BeginVertical(mWindowSettings.CurrentPageContentWidth);
         {
             DrawRight();
             QUI.FlexibleSpace();
         }
         QUI.EndVertical();
         QUI.Space(16);
     }
     QUI.EndScrollView();
 }
        void DrawButtonCategoryAndButtonName(float width)
        {
            QUI.BeginHorizontal(width);
            {
                QUI.Box(QStyles.GetBackgroundStyle(Style.BackgroundType.Low, QColors.Color.Gray), (width - SPACE_2) / 2, 34);
                QUI.Space(SPACE_2);
                QUI.Box(QStyles.GetBackgroundStyle(Style.BackgroundType.Low, QColors.Color.Gray), (width - SPACE_2) / 2, 34);
            }
            QUI.EndHorizontal();

            QUI.Space(-36);

            QUI.BeginHorizontal(width);
            {
                QUI.Space(6);

                QLabel.text  = "Button Category";
                QLabel.style = Style.Text.Small;
                QUI.BeginHorizontal((width - 6) / 2);
                {
                    QUI.Label(QLabel);
                    QUI.FlexibleSpace();
                }
                QUI.EndHorizontal();

                QLabel.text  = "Button Name";
                QLabel.style = Style.Text.Small;
                QUI.BeginHorizontal((width - 6) / 2);
                {
                    QUI.Label(QLabel);
                    QUI.FlexibleSpace();
                }
                QUI.EndHorizontal();
            }
            QUI.EndHorizontal();

            QUI.Space(-SPACE_4);

            QUI.BeginHorizontal(width);
            {
                QUI.Space(4);
                DrawButtonCategory((width - 6) / 2);
                DrawButtonName((width - 6) / 2);
            }
            QUI.EndHorizontal();
        }
        void DrawListenSelector(float width)
        {
            GUI.enabled = false; //disable gui interractions

            QUI.BeginHorizontal(width);
            {
                GUI.enabled = !triggerOnButtonClick.boolValue && !triggerOnButtonDoubleClick.boolValue && !triggerOnButtonLongClick.boolValue;
                QUI.BeginChangeCheck();
                QUI.QToggle("game event", triggerOnGameEvent);
                if (QUI.EndChangeCheck())
                {
                    if (triggerOnGameEvent.boolValue && !dispatchAll.boolValue) //if game event has been selected and dispatch all is disabled -> select the text field
                    {
                        QUI.FocusTextInControl("gameEvent");
                    }
                    if (!triggerOnGameEvent.boolValue) //if game event has been disabled -> reset game event string
                    {
                        gameEvent.stringValue = dispatchAll.boolValue ? DUI.DISPATCH_ALL : string.Empty;
                    }
                }

                GUI.enabled = false;
                QUI.Space(SPACE_8);

                GUI.enabled = !triggerOnGameEvent.boolValue && !triggerOnButtonDoubleClick.boolValue && !triggerOnButtonLongClick.boolValue;
                QUI.QToggle("button click", triggerOnButtonClick);

                GUI.enabled = false;
                QUI.Space(SPACE_8);

                GUI.enabled = !triggerOnGameEvent.boolValue && !triggerOnButtonClick.boolValue && !triggerOnButtonLongClick.boolValue;
                QUI.QToggle("double click", triggerOnButtonDoubleClick);

                GUI.enabled = false;
                QUI.Space(SPACE_8);

                GUI.enabled = !triggerOnGameEvent.boolValue && !triggerOnButtonClick.boolValue && !triggerOnButtonDoubleClick.boolValue;
                QUI.QToggle("long click", triggerOnButtonLongClick);

                QUI.FlexibleSpace();
            }
            QUI.EndHorizontal();

            GUI.enabled = true; //enable gui interractions
        }
        void DrawDeleteFile(string relativePath, string fileName, float width, string fileExtension = ".cs")
        {
            QUI.BeginHorizontal(width);
            {
                QLabel.text  = "Find";
                QLabel.style = Style.Text.Button;
                if (QUI.GhostButton(QLabel.text, QColors.Color.Gray, QLabel.x + 16, 18))
                {
                    // Load object
                    UnityEngine.Object obj = AssetDatabase.LoadAssetAtPath(relativePath + fileName + fileExtension, typeof(UnityEngine.Object));

                    // Select the object in the project folder
                    Selection.activeObject = obj;

                    // Also flash the folder yellow to highlight it
                    EditorGUIUtility.PingObject(obj);
                }

                QUI.Space(SPACE_2);

                QLabel.text  = "Delete: " + fileName;
                QLabel.style = Style.Text.Button;
                if (QUI.GhostButton(QLabel.text, QColors.Color.Gray, QLabel.x + 24, 18))
                {
                    AssetDatabase.DeleteAsset(relativePath + fileName + fileExtension);
                }

                if (CheckThatFileExists(relativePath, fileName, fileExtension))
                {
                }
                else
                {
                    QUI.Space(SPACE_4);
                    QUI.BeginVertical(16, 16);
                    {
                        QUI.Space(2);
                        QUI.DrawTexture(QResources.iconOk.texture, 14, 14);
                    }
                    QUI.EndVertical();
                }

                QUI.FlexibleSpace();
            }
            QUI.EndHorizontal();
        }