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 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(); }
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); } }
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 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); } }
void DrawPageGeneral() { DrawPageHeader("General", QColors.Blue, "", QUI.IsProSkin ? QColors.UnityLight : QColors.UnityMild, DUIResources.pageIconGeneral); QUI.Space(SPACE_16); float leftColumnWidth = 280; float columnSpacing = 8; float rightColumnWidth = 280; QUI.BeginHorizontal(); { DrawControlPanelGeneralSupportedAssets(leftColumnWidth); QUI.Space(columnSpacing); DrawControlPanelGeneralModules(rightColumnWidth); } QUI.EndHorizontal(); QUI.Space(SPACE_16); DrawControlPanelDefineSymbols(WindowSettings.CurrentPageContentWidth); QUI.Space(SPACE_16); DrawNews(WindowSettings.CurrentPageContentWidth); }
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(); }
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); } }
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(); }
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 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 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 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(); }
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 DrawRenameGameObjectButton(float width) { QUI.BeginHorizontal(width); { if (QUI.GhostButton("Rename GameObject", QColors.Color.Gray, width, 18)) { if (serializedObject.isEditingMultipleObjects) { Undo.RecordObjects(targets, "Rename"); 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 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(); }
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 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(); }
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(); }
private void OnGUI() { UpdateWindowSize(); DrawBackground(); QUI.BeginHorizontal(position.width); { DrawSideBar(); QUI.Space(WindowSettings.pageShadowWidth); DrawPages(); } QUI.EndHorizontal(); if (Event.current.type != EventType.Layout) { if (PageScrollPosition != PageLastScrollPosition) //if the user has scrolled, deselect - this is because control IDs within carousel will change when scrolled so we'd end up with the wrong box selected. { GUI.FocusControl(""); //deselect PageLastScrollPosition = PageScrollPosition; } } SearchPatternAnimBool.target = !SearchPattern.IsNullOrEmpty(); Repaint(); }
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 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); }
//———————————————————————————————————— 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 DrawButtonClicksStatus() { QUI.BeginHorizontal(WIDTH_420); { QUI.Label("Button clicks are " + (UIManager.ButtonClicksDisabled ? "DISABLED" : "ENABLED"), DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmallItalic)); } QUI.EndHorizontal(); }
void DrawBackButtonStatus() { QUI.BeginHorizontal(WIDTH_420); { QUI.Label("The 'Back' button is " + (UIManager.BackButtonDisabled ? "DISABLED" : "ENABLED"), DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmallItalic)); } QUI.EndHorizontal(); }
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 DrawTargetParticleSystem() { QUI.BeginHorizontal(WIDTH_420); { QUI.Label("Target ParticleSystem", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 126); QUI.PropertyField(targetParticleSystem, 290); } QUI.EndHorizontal(); }
void DrawSettings() { QUI.BeginHorizontal(WIDTH_420); { QUI.Toggle(autoDisableButtonClicks); QUI.Label("Auto disable Button Clicks when an UIElement is in trasition", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), 408, 18); } QUI.EndHorizontal(); }
void DrawDetectGestures(float width) { QUI.BeginHorizontal(width); { QUI.QToggle("Detect Gestures", detectGestures); QUI.FlexibleSpace(); } QUI.EndHorizontal(); }