コード例 #1
0
 void DrawGameEventOptions()
 {
     if (!triggerOnGameEvent.boolValue)
     {
         return;
     }
     buttonCategory.stringValue = DUI.DEFAULT_CATEGORY_NAME;
     buttonName.stringValue     = DUI.DEFAULT_BUTTON_NAME;
     ValiateUIButtonNameAndCategory();
     SaveColors();
     QUI.SetGUIBackgroundColor(DUIColors.BlueLight.Color);
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Label("Listen for", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 58);
         QUI.PropertyField(triggerOnGameEvent, 12);
         QUI.Label("game event", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 70);
         QUI.Space(SPACE_8);
         QUI.PropertyField(dispatchAll, 12);
         QUI.Label("dispatch all", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 142);
     }
     QUI.EndHorizontal();
     if (dispatchAll.boolValue)
     {
         gameEvent.stringValue = ""; return;
     }
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Label("Game Event", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 72);
         EditorGUILayout.DelayedTextField(gameEvent, GUIContent.none, GUILayout.Width(344));
     }
     QUI.EndHorizontal();
     RestoreColors();
 }
コード例 #2
0
 void DrawListenSelector()
 {
     if (triggerOnGameEvent.boolValue || triggerOnButtonClick.boolValue || triggerOnButtonDoubleClick.boolValue || triggerOnButtonLongClick.boolValue)
     {
         return;
     }
     SaveColors();
     QUI.SetGUIBackgroundColor(DUIColors.BlueLight.Color);
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Label("Listen for", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 58);
         QUI.Space(SPACE_4);
         QUI.PropertyField(triggerOnGameEvent, 12);
         QUI.Label("game event", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 72);
         QUI.Space(SPACE_4);
         QUI.PropertyField(triggerOnButtonClick, 12);
         QUI.Label("button click", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 68);
         QUI.Space(SPACE_4);
         QUI.PropertyField(triggerOnButtonDoubleClick, 12);
         QUI.Label("double click", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 70);
         QUI.Space(SPACE_4);
         QUI.PropertyField(triggerOnButtonLongClick, 12);
         QUI.Label("long click", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 64);
     }
     QUI.EndHorizontal();
     RestoreColors();
 }
コード例 #3
0
 void DrawSpecialElements()
 {
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Label("Special Elements", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 130);
         QUI.BeginChangeCheck();
         {
             QUI.DrawList(specialElements, 288, "No UIElement referenced...");
         }
         if (QUI.EndChangeCheck())
         {
             serializedObject.ApplyModifiedProperties();
             if (uiNotification.specialElements != null && uiNotification.specialElements.Length > 0)
             {
                 for (int i = 0; i < uiNotification.specialElements.Length; i++)
                 {
                     if (uiNotification.specialElements[i] != null)
                     {
                         uiNotification.specialElements[i].transform.SetParent(uiNotification.transform);
                         uiNotification.specialElements[i].name = DUI.DUISettings.UIElement_Inspector_RenameGameObjectPrefix + "Special Element " + i + DUI.DUISettings.UIElement_Inspector_RenameGameObjectSuffix;
                     }
                 }
             }
         }
     }
     QUI.EndHorizontal();
     if (specialElements.arraySize > 0)
     {
         QUI.Space(SPACE_8);
     }
 }
コード例 #4
0
 void DrawEffects()
 {
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Label("Notification Effects", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 130);
         QUI.BeginChangeCheck();
         {
             QUI.DrawList(effects, 288, "No UIEffect referenced...");
         }
         if (QUI.EndChangeCheck())
         {
             serializedObject.ApplyModifiedProperties();
             if (uiNotification.effects != null && uiNotification.effects.Length > 0)
             {
                 for (int i = 0; i < uiNotification.effects.Length; i++)
                 {
                     if (uiNotification.effects[i] != null)
                     {
                         uiNotification.effects[i].targetUIElement = uiNotification.notificationContainer;
                         uiNotification.effects[i].name            = "Notification Effect " + i;
                     }
                 }
             }
         }
     }
     QUI.EndHorizontal();
     if (effects.arraySize > 0)
     {
         QUI.Space(SPACE_8);
     }
 }
コード例 #5
0
 void DrawButtons()
 {
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Label("Notification Buttons", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 130);
         QUI.BeginChangeCheck();
         {
             QUI.DrawList(buttons, 288, "No UIButton referenced...");
         }
         if (QUI.EndChangeCheck())
         {
             serializedObject.ApplyModifiedProperties();
             if (uiNotification.buttons != null && uiNotification.buttons.Length > 0)
             {
                 for (int i = 0; i < uiNotification.buttons.Length; i++)
                 {
                     if (uiNotification.buttons[i] != null)
                     {
                         uiNotification.buttons[i].name = "Notification Button " + i;
                     }
                 }
             }
         }
     }
     QUI.EndHorizontal();
     if (buttons.arraySize > 0)
     {
         QUI.Space(SPACE_8);
     }
 }
コード例 #6
0
        void DrawSortingLayerName()
        {
            QUI.BeginHorizontal(WIDTH_420);
            {
                QUI.Label("Sorting Layer Name", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 126);
                if (!useCustomSortingLayerName.boolValue)
                {
                    targetSortingLayerName = TargetCanvas.overrideSorting
                                             ? TargetCanvas.sortingLayerName
                                             : TargetCanvas.rootCanvas.sortingLayerName;

                    QUI.Label(targetSortingLayerName, DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormalItalic), 140);
                    QUI.Toggle(useCustomSortingLayerName);
                    QUI.Label("use a custom layer name", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 200);
                    customSortingLayerName.stringValue = targetSortingLayerName;
                }
                else
                {
                    if (customSortingLayerName.stringValue == MISSING_UIELEMENT)
                    {
                        customSortingLayerName.stringValue = "Default";
                    }
                    QUI.PropertyField(customSortingLayerName, 140);
                    QUI.Toggle(useCustomSortingLayerName);
                    QUI.Label("use a custom layer name", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 200);
                }
            }
            QUI.EndHorizontal();
            QUI.Space(SPACE_2);
        }
コード例 #7
0
 void DrawSideBarExpandCollapseButton()
 {
     if (QUI.Button("", DUIStyles.GetStyle(WindowSettings.sidebarIsExpanded.faded < 0.9f ? DUIStyles.SideButton.ExpandSideBar : DUIStyles.SideButton.CollapseSideBar), WindowSettings.SidebarCurrentWidth, WindowSettings.sidebarButtonHeight))
     {
         ToggleExpandCollapseSideBar();
     }
 }
コード例 #8
0
        void DrawSideBarHelp()
        {
            QUI.DrawTexture(DUIResources.sideTitleHelp.texture, SIDE_BAR_WIDTH, SIDE_BAR_HEADER_HEIGHT);

            if (CurrentSection == Section.Help)
            {
                QUI.DrawTexture(DUIResources.sideButtonHelpSelected.texture, SIDE_BAR_WIDTH, SIDE_BAR_BUTTON_HEIGHT);
            }
            else
            {
                if (QUI.Button(DUIStyles.GetStyle(DUIStyles.ControlPanel.SideButtonHelp), SIDE_BAR_WIDTH, SIDE_BAR_BUTTON_HEIGHT))
                {
                    CurrentSection = Section.Help;
                    ResetPageView();
                }
            }

            if (CurrentSection == Section.About)
            {
                QUI.DrawTexture(DUIResources.sideButtonAboutSelected.texture, SIDE_BAR_WIDTH, SIDE_BAR_BUTTON_HEIGHT);
            }
            else
            {
                if (QUI.Button(DUIStyles.GetStyle(DUIStyles.ControlPanel.SideButtonAbout), SIDE_BAR_WIDTH, SIDE_BAR_BUTTON_HEIGHT))
                {
                    CurrentSection = Section.About;
                    ResetPageView();
                }
            }
            QUI.Space(VERTICAL_SPACE_DIVIDER);
        }
コード例 #9
0
        void DrawUICanvases()
        {
            QUI.DrawTexture(DUIResources.headerUICanvasesDatabase.texture, 552, 64);
            float sectionWidth = PAGE_WIDTH - SIDE_BAR_SHADOW_WIDTH * 2;

            QUI.BeginHorizontal(sectionWidth);
            {
                QUI.Space(-22);
                QUI.BeginChangeCheck();
                {
                    DrawNamesList(DUI.CanvasNamesDatabase.data, sectionWidth + 22 + 12 - 100, "Add a new canvas name to get started...");
                }
                if (QUI.EndChangeCheck())
                {
                    EditorUtility.SetDirty(DUI.CanvasNamesDatabase);
                }
                QUI.Space(-12);
                if (QUI.Button(DUIStyles.GetStyle(DUIStyles.ControlPanel.PageButtonSortAtoZ), 100, 20))
                {
                    DUI.RefreshCanvasNamesDatabase();
                }
            }
            QUI.EndHorizontal();
            QUI.Space(16);
            if (DUI.CanvasNamesDatabase.Count == 0)
            {
                QUI.DrawTexture(DUIResources.pageImageEmptyDatabase.texture, 552, 256);
                return;
            }
        }
コード例 #10
0
        void DrawOrientation()
        {
            QUI.Space(-SPACE_4);
            switch (orientationManager.CurrentOrientation)
            {
            case OrientationManager.Orientation.Landscape: if (QUI.Button(DUIStyles.GetStyle(DUIStyles.ButtonStyle.OrientationLandscape), 420, 28))
                {
                    UpdateOrientationInEditMode();
                }
                break;

            case OrientationManager.Orientation.Portrait: if (QUI.Button(DUIStyles.GetStyle(DUIStyles.ButtonStyle.OrientationPortrait), 420, 28))
                {
                    UpdateOrientationInEditMode();
                }
                break;

            case OrientationManager.Orientation.Unknown: if (QUI.Button(DUIStyles.GetStyle(DUIStyles.ButtonStyle.OrientationUnknown), 420, 28))
                {
                    UpdateOrientationInEditMode();
                }
                break;
            }
            QUI.Space(SPACE_2);
            SaveColors();
            QUI.SetGUIBackgroundColor(DUIColors.PurpleLight.Color);
            QUI.PropertyField(onOrientationChange, true, new GUIContent("OnOrientationChange"), WIDTH_420);
            RestoreColors();
        }
コード例 #11
0
 void DrawTargetParticleSystem()
 {
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Label("Target ParticleSystem", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 126);
         QUI.PropertyField(targetParticleSystem, 290);
     }
     QUI.EndHorizontal();
 }
コード例 #12
0
 void DrawDebug()
 {
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Toggle(debug);
         QUI.Label("debug", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 54);
     }
     QUI.EndHorizontal();
 }
コード例 #13
0
 void DrawCloseButton()
 {
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Label("Close Button", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 130);
         QUI.PropertyField(closeButton, 281);
     }
     QUI.EndHorizontal();
 }
コード例 #14
0
 void DrawMessage()
 {
     QUI.BeginHorizontal(position.width);
     {
         QUI.Space(10);
         QUI.Label(nMessage, DUIStyles.GetStyle(DUIStyles.NotificationWindow.NotificationMessageBlack), 580, 104);
         QUI.Space(10);
     }
     QUI.EndHorizontal();
 }
コード例 #15
0
 void DrawTitle()
 {
     QUI.BeginHorizontal(position.width);
     {
         QUI.Space(110);
         QUI.Label(nTitle, DUIStyles.GetStyle(DUIStyles.NotificationWindow.NotificationTitleBlack), 480, 40);
         QUI.Space(10);
     }
     QUI.EndHorizontal();
 }
コード例 #16
0
 void DrawDontDestroyOnLoad()
 {
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.PropertyField(dontDestroyOnLoad, 12);
         QUI.Label("Don't Destroy On Load", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), WIDTH_210);
     }
     QUI.EndHorizontal();
     QUI.Space(SPACE_4);
 }
コード例 #17
0
 void DrawAbout()
 {
     QUI.BeginHorizontal(WIDTH_420);
     {
         showHowToUse.target = QUI.Toggle(showHowToUse.target);
         QUI.Label("Remind me how to use this with PlayMaker", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall));
     }
     QUI.EndHorizontal();
     infoMessage["HowToUse"].show.target = showHowToUse.target;
     DrawInfoMessage("HowToUse", WIDTH_420);
 }
コード例 #18
0
 void DrawDispatcherSelector()
 {
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Label("Dispatch", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 68);
         QUI.Toggle(dispatchGameEvents);
         QUI.Label("Game Events", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 68);
         QUI.Toggle(dispatchButtonClicks);
         QUI.Label("Button Clicks", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 68);
     }
     QUI.EndHorizontal();
 }
コード例 #19
0
 void DrawHelpButtons(float width)
 {
     QUI.DrawTexture(DUIResources.pageHelpSeparatorResources.texture, 242, 16);
     QUI.Space(2);
     DrawControlPanelExternalLinkButton(DUIStyles.GetStyle(DUIStyles.ControlPanel.PageHelpForum), "https://goo.gl/vGMBrg");
     QUI.Space(2);
     DrawControlPanelExternalLinkButton(DUIStyles.GetStyle(DUIStyles.ControlPanel.PageHelpManual), "https://goo.gl/LSHMRj");
     QUI.Space(2);
     DrawControlPanelExternalLinkButton(DUIStyles.GetStyle(DUIStyles.ControlPanel.PageHelpApi), "https://goo.gl/Ybsf99");
     QUI.Space(2);
     QUI.DrawTexture(DUIResources.pageHelpButtonMail.texture, 242, 40);
 }
コード例 #20
0
 void DrawControlPanelRecomendedPlugins(float width)
 {
     QUI.DrawTexture(DUIResources.pageControlPanelSeparatorRecomended.texture, 242, 16);
     QUI.Space(2);
     DrawControlPanelExternalLinkButton(DUIStyles.GetStyle(DUIStyles.ControlPanel.PageControlPanelButtonEzDefineSymbols), "https://www.assetstore.unity3d.com/en/#!/content/75541");
     QUI.Space(2);
     DrawControlPanelExternalLinkButton(DUIStyles.GetStyle(DUIStyles.ControlPanel.PageControlPanelButtonEzBind), "https://www.assetstore.unity3d.com/en/#!/content/84939");
     QUI.Space(2);
     DrawControlPanelExternalLinkButton(DUIStyles.GetStyle(DUIStyles.ControlPanel.PageControlPanelButtonEzDataManager), "https://www.assetstore.unity3d.com/en/#!/content/77057");
     QUI.Space(2);
     DrawControlPanelExternalLinkButton(DUIStyles.GetStyle(DUIStyles.ControlPanel.PageControlPanelButtonEzAds), "https://www.assetstore.unity3d.com/en/#!/content/76283");
     QUI.Space(2);
     DrawControlPanelExternalLinkButton(DUIStyles.GetStyle(DUIStyles.ControlPanel.PageControlPanelButtonPooly), "https://www.assetstore.unity3d.com/en/#!/content/82941");
 }
コード例 #21
0
 public override void OnInspectorGUI()
 {
     DrawHeader(DUIResources.headerUIManager.normal, WIDTH_420, HEIGHT_42);
     serializedObject.Update();
     DrawTopButtons();
     DrawOrientationManagerButton();
     DrawDebugOptions();
     DrawSettings();
     QUI.Space(SPACE_4);
     QUI.Label("General Info", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormalItalic));
     DrawBackButtonStatus();
     DrawButtonClicksStatus();
     serializedObject.ApplyModifiedProperties();
     QUI.Space(SPACE_4);
 }
コード例 #22
0
 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();
     }
 }
コード例 #23
0
 void DrawCanvasName()
 {
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Label("Canvas Name", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), WIDTH_105);
         if (EditorApplication.isPlayingOrWillChangePlaymode)
         {
             QUI.Label(canvasName.stringValue, DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormalItalic));
         }
         else
         {
             if (customCanvasName.boolValue)
             {
                 QUI.PropertyField(canvasName, 240);
             }
             else
             {
                 QUI.BeginChangeCheck();
                 {
                     if (DUI.CanvasNamesDatabase == null || !DUI.CanvasNamesDatabase.Contains(canvasName.stringValue))
                     {
                         RefreshCanvasNames(true);
                     }
                     canvasNameIndex = EditorGUILayout.Popup(canvasNameIndex, DUI.CanvasNamesDatabase.ToArray(), GUILayout.Width(240));
                 }
                 if (QUI.EndChangeCheck())
                 {
                     canvasName.stringValue = DUI.CanvasNamesDatabase.data[canvasNameIndex];
                 }
             }
             QUI.Space(SPACE_4);
             QUI.BeginChangeCheck();
             {
                 QUI.PropertyField(customCanvasName, 12);
             }
             if (QUI.EndChangeCheck())
             {
                 if (!customCanvasName.boolValue)
                 {
                     ValidateUICanvasCanvasName();
                 }
             }
             QUI.Label("custom", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 50);
         }
     }
     QUI.EndHorizontal();
     QUI.Space(SPACE_4);
 }
コード例 #24
0
 void DrawTargetUIElement()
 {
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Label("Target UIElement", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 126);
         QUI.BeginChangeCheck();
         {
             QUI.PropertyField(targetUIElement, 290);
         }
         if (QUI.EndChangeCheck())
         {
             serializedObject.ApplyModifiedProperties();
             RenameGameObject();
         }
     }
     QUI.EndHorizontal();
     QUI.Space(-SPACE_2);
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Space(130);
         QUI.Label("Element Category", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 100);
         if (uiEffect.targetUIElement != null)
         {
             QUI.Label(uiEffect.targetUIElement.elementCategory, DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmallItalic), 190);
         }
         else
         {
             QUI.Label(MISSING_UIELEMENT, DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmallItalic), 190);
         }
     }
     QUI.EndHorizontal();
     QUI.Space(-SPACE_4);
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Space(130);
         QUI.Label("Element Name", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 100);
         if (uiEffect.targetUIElement != null)
         {
             QUI.Label(uiEffect.targetUIElement.elementName, DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmallItalic), 190);
         }
         else
         {
             QUI.Label(MISSING_UIELEMENT, DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmallItalic), 190);
         }
     }
     QUI.EndHorizontal();
 }
コード例 #25
0
ファイル: SoundyEditor.cs プロジェクト: ZaK14120/ARS
        private void DrawSettings()
        {
            QUI.BeginHorizontal(WIDTH_420);
            {
                QUI.Label("Master Volume", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 90);
                EditorGUILayout.Slider(masterVolume, 0, 1, GUIContent.none, GUILayout.Width(160));
                QUI.Space(SPACE_4);
                QUI.Label("Sound Channels", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 100);
                QUI.PropertyField(numberOfChannels, 52);
            }
            QUI.EndHorizontal();

            if (numberOfChannels.intValue < 1)
            {
                numberOfChannels.intValue = 1;
            }
        }
コード例 #26
0
 void DrawSideBarGeneral()
 {
     QUI.DrawTexture(DUIResources.sideTitleGeneral.texture, SIDE_BAR_WIDTH, SIDE_BAR_HEADER_HEIGHT);
     if (CurrentSection == Section.ControlPanel)
     {
         QUI.DrawTexture(DUIResources.sideButtonControlPanelSelected.texture, SIDE_BAR_WIDTH, SIDE_BAR_BUTTON_HEIGHT);
     }
     else
     {
         if (QUI.Button(DUIStyles.GetStyle(DUIStyles.ControlPanel.SideButtonControlPanel), SIDE_BAR_WIDTH, SIDE_BAR_BUTTON_HEIGHT))
         {
             CurrentSection = Section.ControlPanel;
             ResetPageView();
         }
     }
     QUI.Space(VERTICAL_SPACE_DIVIDER);
 }
コード例 #27
0
        void DrawButtonNameOptions()
        {
            if (!triggerOnButtonClick.boolValue && !triggerOnButtonDoubleClick.boolValue && !triggerOnButtonLongClick.boolValue)
            {
                return;
            }
            gameEvent.stringValue = "";

            DrawTopButtons();

            SaveColors();
            QUI.SetGUIBackgroundColor(DUIColors.BlueLight.Color);
            QUI.BeginHorizontal(WIDTH_420);
            {
                QUI.Label("Listen for", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 58);
                if (triggerOnButtonClick.boolValue)
                {
                    QUI.PropertyField(triggerOnButtonClick, 12);
                    QUI.Label("button click", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 68);
                }
                else if (triggerOnButtonDoubleClick.boolValue)
                {
                    QUI.PropertyField(triggerOnButtonDoubleClick, 12);
                    QUI.Label("double click", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 70);
                }
                else if (triggerOnButtonLongClick.boolValue)
                {
                    QUI.PropertyField(triggerOnButtonLongClick, 12);
                    QUI.Label("long click", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 64);
                }
                QUI.Space(SPACE_8);
                QUI.PropertyField(dispatchAll, 12);
                QUI.Label("dispatch all", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 142);
            }
            QUI.EndHorizontal();

            if (dispatchAll.boolValue)
            {
                gameEvent.stringValue = ""; return;
            }
            DrawButtonCategory();
            DrawButtonName();
            RestoreColors();
        }
コード例 #28
0
 void DrawButtonName()
 {
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Label("Button Name", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), WIDTH_105);
         if (EditorApplication.isPlayingOrWillChangePlaymode)
         {
             QUI.Label(buttonName.stringValue, DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormalItalic));
         }
         else
         {
             if (buttonCategory.stringValue.Equals(DUI.CUSTOM_NAME))
             {
                 EditorGUILayout.DelayedTextField(buttonName, GUIContent.none);
             }
             else
             {
                 if (DUI.GetUIButtonNames(DUI.UIButtonCategories[buttonCategoryIndex]).Count == 0)
                 {
                     QUI.Label(buttonName.stringValue, DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormalItalic), 90);
                     QUI.FlexibleSpace();
                     QUI.Label("(Empty Category)", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmallItalic), 86);
                 }
                 else
                 {
                     QUI.BeginChangeCheck();
                     {
                         if (!DUI.UIButtonCategoryExists(buttonCategory.stringValue))
                         {
                             RefreshButtonNameAndCategory(true);
                         }
                         buttonNameIndex = EditorGUILayout.Popup(buttonNameIndex, DUI.GetUIButtonNames(buttonCategory.stringValue).ToArray());
                     }
                     if (QUI.EndChangeCheck())
                     {
                         buttonName.stringValue = DUI.GetUIButtonNames(buttonCategory.stringValue)[buttonNameIndex];
                     }
                 }
             }
         }
     }
     QUI.EndHorizontal();
     QUI.Space(SPACE_4);
 }
コード例 #29
0
        void DrawSortingOrder()
        {
            QUI.BeginHorizontal(WIDTH_420);
            {
                QUI.Label("Order in Layer", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 126);
                if (!useCustomOrderInLayer.boolValue)
                {
                    targetOrderInLayer = TargetCanvas.overrideSorting
                                         ? TargetCanvas.sortingOrder
                                         : TargetCanvas.rootCanvas.sortingOrder;

                    targetOrderInLayer = uiEffect.effectPosition == UIEffect.EffectPosition.InFrontOfTarget
                                         ? targetOrderInLayer + uiEffect.sortingOrderStep
                                         : targetOrderInLayer - uiEffect.sortingOrderStep;

                    QUI.Label(targetOrderInLayer.ToString(), DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormalItalic), 140);
                    QUI.Toggle(useCustomOrderInLayer);
                    QUI.Label("use a custom order in layer", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 200);
                    customOrderInLayer.intValue = targetOrderInLayer;
                }
                else
                {
                    QUI.PropertyField(customOrderInLayer, 140);
                    QUI.Toggle(useCustomOrderInLayer);
                    QUI.Label("use a custom order in layer", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 200);
                }
            }
            QUI.EndHorizontal();
            if (!useCustomOrderInLayer.boolValue)
            {
                QUI.BeginHorizontal(WIDTH_420);
                {
                    QUI.Space(130);
                    QUI.Label("Set the effect", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 68);
                    QUI.PropertyField(effectPosition, 110);
                    QUI.Label("by", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 16);
                    QUI.PropertyField(sortingOrderStep, 40);
                    QUI.Label("step" + (sortingOrderStep.intValue == 1 ? "" : "s"), DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 40);
                }
                QUI.EndHorizontal();
            }
            QUI.Space(SPACE_2);
        }
コード例 #30
0
 void DrawButtons()
 {
     QUI.BeginHorizontal(position.width);
     {
         QUI.FlexibleSpace();
         QUI.BeginVertical(240);
         {
             if (QUI.Button(DUIStyles.GetStyle(DUIStyles.UpgradeManager.ButtonUpgradeScene), 240, 40))
             {
                 NotificationWindow.YesNo("Upgrade Current Scene",
                                          "Are you sure you want to upgrade the current scene?" +
                                          "\n\n" +
                                          "This process will override all the values of DoozyUI components by getting the old version values and converting them to the new version values.",
                                          UpgradeScene,
                                          null);
             }
             QUI.Space(SPACE_8);
             if (QUI.Button(DUIStyles.GetStyle(DUIStyles.UpgradeManager.ButtonCleanFiles), 240, 40))
             {
                 NotificationWindow.OkCancel("Clean Files",
                                             "This process will delete all the files that are no longer needed by the system. These files were used by the old core and are no longer needed by the new one.",
                                             CleanFiles,
                                             null);
             }
             QUI.Space(SPACE_8);
             if (QUI.Button(DUIStyles.GetStyle(DUIStyles.UpgradeManager.ButtonDeleteExamples), 240, 40))
             {
                 NotificationWindow.OkCancel("Delete Old Examples",
                                             "Are you sure you want to delete the old examples folder?" +
                                             "\n\n" +
                                             "If you are referencing anything from it, in your current project, it is recommended that you keep it." +
                                             "\n\n" +
                                             "The old examples folder is Assets/DoozyUI/_EXAMPLES",
                                             DeleteExamples,
                                             null);
             }
         }
         QUI.EndVertical();
         QUI.FlexibleSpace();
     }
     QUI.EndHorizontal();
 }