示例#1
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();
        }
示例#2
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();
            }
        }
示例#3
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);
        }
示例#4
0
 void DrawUpdateSortingLayerButton()
 {
     if (QUI.Button("Update Sorting", WIDTH_420, HEIGHT_24))
     {
         if (!uiCanvas.Canvas.isRootCanvas)
         {
             EditorUtility.DisplayDialog("UICanvas Issue",
                                         "The UICanvas, on the " + uiCanvas.name + " gameObject, is not attached to a root canvas. This component should be attached to a top canvas in the Hierarchy.",
                                         "Ok");
             return;
         }
         if (EditorUtility.DisplayDialog("Update Sorting",
                                         "You are about to change the Sorting Layer Name of all the Canvases and Renderers, under this gameObject, to '" + uiCanvas.Canvas.sortingLayerName + "'." +
                                         "\n" + "\n" +
                                         "'" + uiCanvas.Canvas.sortingLayerName + "' is the Sorting Layer set to the Canvas component attached to this gameObject. (root canvas)" +
                                         "\n" + "\n" +
                                         "Are you sure you want to do that?" +
                                         "\n" +
                                         "(operation cannot be undone)",
                                         "Ok",
                                         "Cancel"))
         {
             UIManager.UpdateCanvasSortingLayerName(uiCanvas.gameObject, uiCanvas.Canvas.sortingLayerName);
             UIManager.UpdateRendererSortingLayerName(uiCanvas.gameObject, uiCanvas.Canvas.sortingLayerName);
         }
     }
     QUI.Space(SPACE_4);
 }
 void DrawSideBarExpandCollapseButton()
 {
     if (QUI.Button("", DUIStyles.GetStyle(WindowSettings.sidebarIsExpanded.faded < 0.9f ? DUIStyles.SideButton.ExpandSideBar : DUIStyles.SideButton.CollapseSideBar), WindowSettings.SidebarCurrentWidth, WindowSettings.sidebarButtonHeight))
     {
         ToggleExpandCollapseSideBar();
     }
 }
        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;
            }
        }
 void DrawRenameGameObjectButton()
 {
     if (!DUI.DUISettings.UIEffect_Inspector_ShowButtonRenameGameObject || (uiEffect.targetUIElement != null && uiEffect.targetUIElement.linkedToNotification))
     {
         return;
     }
     QUI.Space(SPACE_2);
     QUI.BeginHorizontal(WIDTH_420);
     {
         if (QUI.Button("Rename GameObject to target Element Name"))
         {
             if (serializedObject.isEditingMultipleObjects)
             {
                 Undo.RecordObjects(targets, "Renamed Multiple Objects");
                 for (int i = 0; i < targets.Length; i++)
                 {
                     UIEffect iTarget = (UIEffect)targets[i];
                     iTarget.gameObject.name = iTarget.targetUIElement != null
                                               ? (DUI.DUISettings.UIEffect_Inspector_RenameGameObjectPrefix + iTarget.targetUIElement.elementName + DUI.DUISettings.UIEffect_Inspector_RenameGameObjectSuffix)
                                               : "UIEffect DISABLED";
                 }
             }
             else
             {
             }
             RenameGameObject();
         }
     }
     QUI.EndHorizontal();
 }
 void DrawBtnExpandCollapseSideBar()
 {
     if (QUI.Button("", EZStyles.GetStyle(WindowSettings.sidebarIsExpanded.faded < 0.9f ? EZStyles.General.SideButtonExpandSideBar : EZStyles.General.SideButtonCollapseSideBar), WindowSettings.SidebarCurrentWidth, WindowSettings.sidebarButtonHeight))
     {
         WindowSettings.sidebarIsExpanded.target = !WindowSettings.sidebarIsExpanded.target;
     }
 }
 void DrawControlPanelExternalLinkButton(GUIStyle style, string url)
 {
     if (QUI.Button(style, 242, 40))
     {
         Application.OpenURL(url);
     }
 }
示例#10
0
 void DrawRemoveComponentButton()
 {
     if (QUI.Button("Remove Component", WIDTH_420, HEIGHT_24))
     {
         DestroyImmediate(uiCanvas);
         QUI.ExitGUI();
     }
     QUI.Space(SPACE_4);
 }
示例#11
0
        protected override void DrawLeft()
        {
            bool isNav = (type == EType.Nva || type == EType.Nva1 || type == EType.Nva2);

            tempLabel = mWindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : "NavMesh 导航";
            if (QUI.Button(tempLabel, EZStyles.GetStyle(type == EType.Nva ? EZStyles.General.SideButtonSelected2 : EZStyles.General.SideButton2), mWindowSettings.SidebarCurrentWidth, mWindowSettings.sidebarButtonHeight))
            {
                SetTheSame(EType.Nva);
            }

            if (isNav)
            {
                tempLabel = mWindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : (type == EType.Nva1 ? "  实现物体导航".AddBlue() : "  实现物体导航");
                if (QUI.Button(tempLabel, EZStyles.GetStyle(EZStyles.General.SideButtonBlue), mWindowSettings.SidebarCurrentWidth, mWindowSettings.sidebarButtonHeight))
                {
                    SetTheSame(EType.Nva1);
                }
                tempLabel = mWindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : (type == EType.Nva2 ? "  导航数据与优化".AddBlue() : "  导航数据与优化");
                if (QUI.Button(tempLabel, EZStyles.GetStyle(EZStyles.General.SideButtonBlue), mWindowSettings.SidebarCurrentWidth, mWindowSettings.sidebarButtonHeight))
                {
                    SetTheSame(EType.Nva2);
                }
            }


            MyCreate.AddSpace(20);
            bool isReGenXin = (type == EType.RenGenXin || type == EType.RenGenXin1 || type == EType.RenGenXin2);


            tempLabel = mWindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : "热更新";
            if (QUI.Button(tempLabel, EZStyles.GetStyle(type == EType.RenGenXin ? EZStyles.General.SideButtonSelected3 : EZStyles.General.SideButton3), mWindowSettings.SidebarCurrentWidth, mWindowSettings.sidebarButtonHeight))
            {
                SetTheSame(EType.RenGenXin);
            }
            if (isReGenXin)
            {
                tempLabel = mWindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : (type == EType.RenGenXin1 ? "  数据结构用法".AddBlue() : "  数据结构用法");
                if (QUI.Button(tempLabel, EZStyles.GetStyle(EZStyles.General.SideButtonBlue), mWindowSettings.SidebarCurrentWidth, mWindowSettings.sidebarButtonHeight))
                {
                    SetTheSame(EType.RenGenXin1);
                }
                tempLabel = mWindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : (type == EType.RenGenXin2 ? "  uLua 说明".AddBlue() : "  uLua 说明");
                if (QUI.Button(tempLabel, EZStyles.GetStyle(EZStyles.General.SideButtonBlue), mWindowSettings.SidebarCurrentWidth, mWindowSettings.sidebarButtonHeight))
                {
                    SetTheSame(EType.RenGenXin2);
                }
            }


            MyCreate.AddSpace(20);
            tempLabel = mWindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : "小地图";
            if (QUI.Button(tempLabel, EZStyles.GetStyle(type == EType.XiaoMap ? EZStyles.General.SideButtonSelected1 : EZStyles.General.SideButton1), mWindowSettings.SidebarCurrentWidth, mWindowSettings.sidebarButtonHeight))
            {
                SetTheSame(EType.XiaoMap);
            }
        }
 void DrawSideButton(Page page, string label, GUIStyle style, GUIStyle styleSelected)
 {
     tempLabel = WindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : label;
     if (QUI.Button(tempLabel, WindowSettings.currentPage != page ? style : styleSelected, WindowSettings.SidebarCurrentWidth, WindowSettings.sidebarButtonHeight))
     {
         if (WindowSettings.currentPage != page)
         {
             WindowSettings.currentPage = page;
             ResetPageView();
         }
     }
 }
示例#13
0
        protected override void DrawLeft()
        {
            tempLabel = mWindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : "官方文档";
            if (QUI.Button(tempLabel, EZStyles.GetStyle(type == EType.Gun ? EZStyles.General.SideButtonSelected1 : EZStyles.General.SideButton1), mWindowSettings.SidebarCurrentWidth, mWindowSettings.sidebarButtonHeight))
            {
                SetTheSame(EType.Gun);
            }

            AddSpace_15();


            tempLabel = mWindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : "工具";
            if (QUI.Button(tempLabel, EZStyles.GetStyle(type == EType.Tools1 ? EZStyles.General.SideButtonSelected2 : EZStyles.General.SideButton2), mWindowSettings.SidebarCurrentWidth, mWindowSettings.sidebarButtonHeight))
            {
                SetTheSame(EType.Tools1);
            }


            AddSpace_15();

            bool isStudy = type == EType.Study1 || type == EType.Study2 || type == EType.Study3 || type == EType.Study4;

            tempLabel = mWindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : "学习使用";
            if (QUI.Button(tempLabel, EZStyles.GetStyle(isStudy ? EZStyles.General.SideButtonSelected3 : EZStyles.General.SideButton3), mWindowSettings.SidebarCurrentWidth, mWindowSettings.sidebarButtonHeight))
            {
                SetTheSame(EType.Study1);
            }
            if (isStudy)
            {
                tempLabel = mWindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : (type == EType.Study1 ? "   总结".AddBlue() : "   总结");
                if (QUI.Button(tempLabel, EZStyles.GetStyle(EZStyles.General.SideButtonBlue), mWindowSettings.SidebarCurrentWidth, mWindowSettings.sidebarButtonHeight))
                {
                    SetTheSame(EType.Study1);
                }
                tempLabel = mWindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : (type == EType.Study2 ? "   核心类 ES3".AddBlue() : "   核心类 ES3");
                if (QUI.Button(tempLabel, EZStyles.GetStyle(EZStyles.General.SideButtonBlue), mWindowSettings.SidebarCurrentWidth, mWindowSettings.sidebarButtonHeight))
                {
                    SetTheSame(EType.Study2);
                }
                tempLabel = mWindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : (type == EType.Study3 ? "   ES3Settings".AddBlue() : "   ES3Settings");
                if (QUI.Button(tempLabel, EZStyles.GetStyle(EZStyles.General.SideButtonBlue), mWindowSettings.SidebarCurrentWidth, mWindowSettings.sidebarButtonHeight))
                {
                    SetTheSame(EType.Study3);
                }
                tempLabel = mWindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : (type == EType.Study4? "   TODO".AddBlue() : "   TODO");
                if (QUI.Button(tempLabel, EZStyles.GetStyle(EZStyles.General.SideButtonBlue), mWindowSettings.SidebarCurrentWidth, mWindowSettings.sidebarButtonHeight))
                {
                    SetTheSame(EType.Study4);
                }
            }

            AddSpace();
        }
 void DrawBtnDefineSymbols()
 {
     tempLabel = WindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : "Define Symbols";
     if (QUI.Button(tempLabel, EZStyles.GetStyle(WindowSettings.currentPage == Page.DefineSymbols ? EZStyles.General.SideButtonSelectedDefineSymbols : EZStyles.General.SideButtonDefineSymbols), WindowSettings.SidebarCurrentWidth, WindowSettings.sidebarButtonHeight))
     {
         if (WindowSettings.currentPage != Page.DefineSymbols)
         {
             WindowSettings.currentPage = Page.DefineSymbols;
             ResetPageView();
         }
     }
 }
 void DrawBtnDataBind()
 {
     tempLabel = WindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : "Data Bind";
     if (QUI.Button(tempLabel, EZStyles.GetStyle(WindowSettings.currentPage == Page.DataBind ? EZStyles.General.SideButtonSelectedDataBind : EZStyles.General.SideButtonDataBind), WindowSettings.SidebarCurrentWidth, WindowSettings.sidebarButtonHeight))
     {
         if (WindowSettings.currentPage != Page.DataBind)
         {
             WindowSettings.currentPage = Page.DataBind;
             ResetPageView();
         }
     }
 }
 void DrawBtnHelp()
 {
     tempLabel = WindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : "Help";
     if (QUI.Button(tempLabel, EZStyles.GetStyle(WindowSettings.currentPage == Page.Help ? EZStyles.General.SideButtonSelectedHelpBtnHelp : EZStyles.General.SideButtonHelpBtnHelp), WindowSettings.SidebarCurrentWidth, WindowSettings.sidebarButtonHeight))
     {
         if (WindowSettings.currentPage != Page.Help)
         {
             WindowSettings.currentPage = Page.Help;
             ResetPageView();
         }
     }
 }
 void DrawBtnControlPanel()
 {
     tempLabel = WindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : "Control Panel";
     if (QUI.Button(tempLabel, EZStyles.GetStyle(WindowSettings.currentPage == Page.General ? EZStyles.General.SideButtonSelectedControlPanel : EZStyles.General.SideButtonControlPanel), WindowSettings.SidebarCurrentWidth, WindowSettings.sidebarButtonHeight))
     {
         if (WindowSettings.currentPage != Page.General)
         {
             WindowSettings.currentPage = Page.General;
             ResetPageView();
         }
     }
 }
 void DrawBtnAbout()
 {
     tempLabel = WindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : "About";
     if (QUI.Button(tempLabel, EZStyles.GetStyle(WindowSettings.currentPage == Page.About ? EZStyles.General.SideButtonSelectedAbout : EZStyles.General.SideButtonAbout), WindowSettings.SidebarCurrentWidth, WindowSettings.sidebarButtonHeight))
     {
         if (WindowSettings.currentPage != Page.About)
         {
             WindowSettings.currentPage = Page.About;
             ResetPageView();
         }
     }
 }
 void DrawBtnPooly()
 {
     tempLabel = WindowSettings.sidebarIsExpanded.faded < 0.6f ? "" : "Pooly";
     if (QUI.Button(tempLabel, EZStyles.GetStyle(WindowSettings.currentPage == Page.Pooly ? EZStyles.General.SideButtonSelectedPooly : EZStyles.General.SideButtonPooly), WindowSettings.SidebarCurrentWidth, WindowSettings.sidebarButtonHeight))
     {
         if (WindowSettings.currentPage != Page.Pooly)
         {
             WindowSettings.currentPage = Page.Pooly;
             ResetPageView();
         }
     }
 }
示例#20
0
 void DrawUpdateSortingButton()
 {
     QUI.Space(SPACE_4);
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Space(130);
         if (QUI.Button("Update Sorting", WIDTH_420 - 130, HEIGHT_24))
         {
             uiEffect.UpdateSorting();
         }
     }
     QUI.EndHorizontal();
     QUI.Space(SPACE_4);
 }
 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 DrawTopButtons()
 {
     QUI.BeginHorizontal(WIDTH_420);
     {
         if (QUI.Button("UIButtons Database"))
         {
             ControlPanelWindow.Open(ControlPanelWindow.Section.UIButtons);
         }
         if (QUI.Button("Refresh Data"))
         {
             RefreshData(true);
         }
     }
     QUI.EndHorizontal();
     QUI.Space(SPACE_2);
 }
示例#23
0
 void DrawRenameGameObjectButton()
 {
     if (!DUI.DUISettings.UIEffect_Inspector_ShowButtonRenameGameObject || (uiEffect.targetUIElement != null && uiEffect.targetUIElement.linkedToNotification))
     {
         return;
     }
     QUI.Space(SPACE_2);
     QUI.BeginHorizontal(WIDTH_420);
     {
         if (QUI.Button("Rename GameObject to target Element Name"))
         {
             RenameGameObject();
         }
     }
     QUI.EndHorizontal();
 }
示例#24
0
 void DrawOrientationManagerButton()
 {
     if (!UIManager.useOrientationManager)
     {
         return;
     }
     QUI.BeginHorizontal(WIDTH_420);
     {
         if (QUI.Button("Add Orientation Manager to Scene"))
         {
             OrientationManager.AddOrientationManagerToScene();
         }
     }
     QUI.EndHorizontal();
     QUI.Space(SPACE_2);
 }
示例#25
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);
 }
示例#26
0
        void DrawAddParticleSystemButton()
        {
            if (uiEffect.targetParticleSystem != null)
            {
                return;
            }
            QUI.BeginHorizontal(WIDTH_420);
            {
                if (QUI.Button("Add a ParticleSystem to this gameObject"))
                {
                    targetParticleSystem.objectReferenceValue = uiEffect.GetComponent <ParticleSystem>() == null?uiEffect.gameObject.AddComponent <ParticleSystem>() : uiEffect.GetComponent <ParticleSystem>();

                    serializedObject.ApplyModifiedProperties();
                    uiEffect.targetParticleSystem.GetComponent <ParticleSystemRenderer>().material = AssetDatabase.GetBuiltinExtraResource <Material>("Default-Particle.mat");
                }
            }
            QUI.EndHorizontal();
            QUI.Space(SPACE_4);
        }
示例#27
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();
 }
示例#28
0
 void DrawSideBarSocial()
 {
     QUI.BeginHorizontal(SIDE_BAR_WIDTH);
     {
         if (QUI.Button(DUIStyles.GetStyle(DUIStyles.ControlPanel.ButtonTwitter), 100, 20))
         {
             Application.OpenURL("https://twitter.com/doozyplay");
         }
         if (QUI.Button(DUIStyles.GetStyle(DUIStyles.ControlPanel.ButtonFacebook), 100, 20))
         {
             Application.OpenURL("https://www.facebook.com/doozyentertainment");
         }
         if (QUI.Button(DUIStyles.GetStyle(DUIStyles.ControlPanel.ButtonYoutube), 100, 20))
         {
             Application.OpenURL("http://www.youtube.com/c/DoozyEntertainment");
         }
     }
     QUI.EndHorizontal();
     QUI.Space(VERTICAL_SPACE_DIVIDER / 2);
 }
示例#29
0
 void DrawTopButtons()
 {
     QUI.BeginHorizontal(WIDTH_420);
     {
         if (QUI.Button("Control Panel"))
         {
             ControlPanelWindow.Open(ControlPanelWindow.Section.ControlPanel);
         }
         if (QUI.Button("Editor Settings"))
         {
             ControlPanelWindow.Open(ControlPanelWindow.Section.Settings);
         }
         if (QUI.Button("Help"))
         {
             ControlPanelWindow.Open(ControlPanelWindow.Section.Help);
         }
     }
     QUI.EndHorizontal();
     QUI.Space(SPACE_2);
 }
示例#30
0
 public override void OnInspectorGUI()
 {
     base.OnInspectorGUI();
     QUI.Space(SPACE_8);
     if (QUI.Button("Update Text"))
     {
         if (serializedObject.isEditingMultipleObjects)
         {
             foreach (var t in targets)
             {
                 ButtonPresetToText s = (ButtonPresetToText)t;
                 s.UpdateTextAndButtonName();
             }
         }
         else
         {
             Script.UpdateTextAndButtonName();
         }
     }
 }