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(); }
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(); }
public static void DrawUnityEvents(bool enabled, AnimBool showEvents, SerializedProperty unityEvent, string unityEventTitle, float width, float miniBarHeight) { if (QUI.GhostBar("Unity Events", enabled ? QColors.Color.Blue : QColors.Color.Gray, showEvents, width, miniBarHeight)) { showEvents.target = !showEvents.target; } QUI.BeginHorizontal(width); { QUI.Space(8 * showEvents.faded); if (QUI.BeginFadeGroup(showEvents.faded)) { QUI.SetGUIBackgroundColor(enabled ? AccentColorBlue : AccentColorGray); QUI.BeginVertical(width - 16); { QUI.Space(2 * showEvents.faded); QUI.PropertyField(unityEvent, new GUIContent() { text = unityEventTitle }, width - 8); QUI.Space(2 * showEvents.faded); } QUI.EndVertical(); QUI.ResetColors(); } QUI.EndFadeGroup(); } QUI.EndHorizontal(); }
bool CheckThatFileExists(string relativePath, string fileName, string fileExtension) { if (System.IO.File.Exists(relativePath + fileName + fileExtension)) { QUI.Space(SPACE_4); QLabel.text = "File exists."; QLabel.style = Style.Text.Help; QUI.BeginVertical(16, 16); { QUI.Space(2); QUI.DrawTexture(QResources.iconError.texture, 14, 14); } QUI.EndVertical(); QUI.Space(-SPACE_2); QUI.Label(QLabel); return(true); } return(false); }
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(); }
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(); }
bool CheckThatFolderIsEmpty(string relativePath) { var fileNames = System.IO.Directory.GetFiles(relativePath); if (fileNames.Length > 0) { QUI.Space(SPACE_4); QLabel.text = "This folder contains files. Click to delete them."; QLabel.style = Style.Text.Help; QUI.BeginVertical(16, 16); { QUI.Space(2); QUI.DrawTexture(QResources.iconWarning.texture, 14, 14); } QUI.EndVertical(); QUI.Space(-SPACE_2); QUI.Label(QLabel); return(true); } return(false); }
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 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 DrawPlayModeSettings(float width) { showPlayModeSettings.target = EditorApplication.isPlayingOrWillChangePlaymode; if (QUI.BeginFadeGroup(showPlayModeSettings.faded)) { QUI.BeginVertical(width); { QUI.Space(SPACE_4 * showPlayModeSettings.faded); QUI.BeginHorizontal(width); { if (QUI.GhostButton("OPEN", QColors.Color.Blue, (width - SPACE_2) / 2, BarHeight)) { Drawer.Open(); } if (QUI.GhostButton("CLOSE", QColors.Color.Blue, (width - SPACE_2) / 2, BarHeight)) { Drawer.Close(); } } QUI.EndHorizontal(); QUI.Space(SPACE_16 * showPlayModeSettings.faded); } QUI.EndVertical(); } QUI.EndFadeGroup(); }
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(); }
//———————————————————————————————————— 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 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); }
void DrawSortingLayerName(float width) { QUI.Box(QStyles.GetBackgroundStyle(Style.BackgroundType.Low, useCustomSortingLayerName.boolValue ? QColors.Color.Blue : QColors.Color.Gray), width - 164, 20); QUI.Space(-20); QUI.BeginHorizontal(width); { QLabel.text = "Sorting Layer Name"; QLabel.style = Style.Text.Normal; tempFloat = QLabel.x; //save label width QUI.Space(SPACE_4); QUI.BeginVertical(QLabel.x, QUI.SingleLineHeight); { QUI.Space(1); QUI.Label(QLabel); } QUI.EndVertical(); if (!useCustomSortingLayerName.boolValue) { targetSortingLayerName = TargetCanvas.overrideSorting ? TargetCanvas.sortingLayerName : TargetCanvas.rootCanvas.sortingLayerName; QLabel.text = targetSortingLayerName; QLabel.style = Style.Text.Help; QUI.BeginVertical(width - tempFloat - 174, QUI.SingleLineHeight); { QUI.Space(2); QUI.Label(QLabel); } QUI.EndVertical(); customSortingLayerName.stringValue = targetSortingLayerName; } else { if (customSortingLayerName.stringValue == MISSING_UIELEMENT) { customSortingLayerName.stringValue = "Default"; } QUI.PropertyField(customSortingLayerName, width - tempFloat - 184); QUI.Space(2); } QUI.QToggle("use a custom layer name", useCustomSortingLayerName, 20); } QUI.EndHorizontal(); QUI.Space(SPACE_2); }
void DrawControlPanelGeneralModules(float width) { QUI.BeginVertical(width); { DrawControlPanelGeneralButton("UINavigation", buttonStyleUINavigation, DUI.UINavigationEnabled, DUI.SYMBOL_NAVIGATION_SYSTEM, width, true); QUI.Space(SPACE_8); DrawControlPanelGeneralButton("OrientationManager", buttonStyleOrientationManager, DUI.OrientationManagerEnabled, DUI.SYMBOL_ORIENTATION_MANAGER, width, false); QUI.Space(SPACE_8); DrawControlPanelGeneralButton("SceneLoader", buttonStyleSceneLoader, DUI.SceneLoaderEnabled, DUI.SYMBOL_SCENE_LOADER, width, true); } QUI.EndVertical(); }
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(); }
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(); }
void DrawSideBar() { QUI.BeginVertical(300); { DrawSideBarLogo(); DrawSideBarGeneral(); DrawSideBarDatabases(); DrawSideBarSystem(); DrawSideBarHelp(); QUI.FlexibleSpace(); DrawSideBarSocial(); } QUI.EndVertical(); }
void DrawControlPanelGeneralSupportedAssets(float width) { QUI.BeginVertical(width); { DrawControlPanelGeneralButton("PlayMaker", buttonStylePlayMaker, DUI.PlayMakerEnabled, DUI.SYMBOL_PLAYMAKER, width); QUI.Space(SPACE_8); DrawControlPanelGeneralButton("MasterAudio", buttonStyleMasterAudio, DUI.MasterAudioEnabled, DUI.SYMBOL_MASTER_AUDIO, width); QUI.Space(SPACE_8); DrawControlPanelGeneralButton("EnergyBarToolkit", buttonStyleEnergyBarToolkit, DUI.EnergyBarToolkitEnabled, DUI.SYMBOL_ENERGY_BAR_TOOLKIT, width); QUI.Space(SPACE_8); DrawControlPanelGeneralButton("TextMeshPro", buttonStyleTextMeshPro, DUI.TextMeshProEnabled, DUI.SYMBOL_TEXT_MESH_PRO, width); } 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 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 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(); }
void DrawActiveSymbolsList(float width) { if (symbols == null || symbols.Count == 0) { symbols = new List <string> { "" }; } QUI.BeginVertical(width); { for (int i = 0; i < symbols.Count; i++) { DrawListItem(symbols, i, true, width, EditorGUIUtility.singleLineHeight); QUI.Space(3); } } QUI.EndVertical(); }
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(); }
void DrawPages() { InitPages(); SectionScrollPosition = QUI.BeginScrollView(SectionScrollPosition); { QUI.BeginVertical(WindowSettings.CurrentPageContentWidth); { switch (WindowSettings.currentPage) { case Page.General: DrawPageGeneral(); break; case Page.UIElements: DrawPageUIElements(); break; case Page.UIButtons: DrawPageUIButtons(); break; case Page.UISounds: DrawPageUISounds(); break; case Page.UICanvases: DrawPageUICanvases(); break; case Page.AnimatorPresets: DrawPageAnimatorPresets(); break; case Page.EditorSettings: DrawPageEditorSettings(); break; case Page.Help: DrawPageHelp(); break; case Page.About: DrawPageAbout(); break; } QUI.FlexibleSpace(); } QUI.EndVertical(); QUI.Space(SPACE_16); } QUI.EndScrollView(); if (ExecuteInitPage) //an InitPage has been executed -> stop another InitPage from being executed (for the same Page) until at lease one of the triggering conditions is met again { PreviousPage = WindowSettings.currentPage; refreshData = false; } }
void DrawPages() { InitPages(); PageScrollPosition = QUI.BeginScrollView(PageScrollPosition); { QUI.BeginVertical(WindowSettings.CurrentPageContentWidth); { switch (WindowSettings.currentPage) { case Page.General: break; case Page.DefineSymbols: DrawDefineSymbols(); break; case Page.DataManager: DrawDataManager(); break; case Page.DataBind: DrawBind(); break; case Page.Pooly: DrawPooly(); break; case Page.Ads: DrawAds(); break; case Page.Help: DrawHelp(); break; case Page.About: DrawAbout(); break; } QUI.FlexibleSpace(); } QUI.EndVertical(); QUI.Space(16); } QUI.EndScrollView(); if (PreviousPage != WindowSettings.currentPage || refreshData) { PreviousPage = WindowSettings.currentPage; refreshData = false; } }
void DrawSideBar() { QUI.BeginVertical(WindowSettings.SidebarCurrentWidth); { DrawSideBarLogo(); DrawBtnExpandCollapseSideBar(); QUI.Space(WindowSettings.sidebarVerticalSpacing); //DrawBtnControlPanel(); //QUI.Space(WindowSettings.sidebarVerticalSpacing); DrawBtnDefineSymbols(); DrawBtnDataManager(); DrawBtnDataBind(); DrawBtnPooly(); DrawBtnAdsManager(); QUI.Space(WindowSettings.sidebarVerticalSpacing); DrawBtnHelp(); DrawBtnAbout(); QUI.FlexibleSpace(); DrawSocialButtons(); } QUI.EndVertical(); }
void DrawPageUICanvases() { DrawPageHeader("UICanvases", QColors.Blue, "Database", QUI.IsProSkin ? QColors.UnityLight : QColors.UnityMild, DUIResources.pageIconUICanvases); QUI.Space(6); DrawPageUICanvasesRefreshButton(WindowSettings.CurrentPageContentWidth); QUI.Space(SPACE_16); QUI.BeginHorizontal(WindowSettings.CurrentPageContentWidth); { QUI.BeginVertical(WindowSettings.CurrentPageContentWidth - SPACE_8); { DrawStringList(DUIData.Instance.DatabaseUICanvases, WindowSettings.CurrentPageContentWidth - SPACE_8, UICanvasesAnimBool); } QUI.EndVertical(); } QUI.EndHorizontal(); QUI.Space(SPACE_16); }