Exemplo n.º 1
0
        void UpdateAllNavigationData()
        {
            if (!UIManager.IsNavigationEnabled)
            {
                return;
            }

            DUIUtils.UpdateNavigationDataList(gestureDetector.navigationPointerData.show, editorNavigationData.showIndex);
            DUIUtils.UpdateNavigationDataList(gestureDetector.navigationPointerData.hide, editorNavigationData.hideIndex);
        }
Exemplo n.º 2
0
        public override void OnInspectorGUI()
        {
            DrawHeader(DUIResources.headerGestureDetector.texture, WIDTH_420, HEIGHT_42);

            serializedObject.Update();

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

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

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

            serializedObject.ApplyModifiedProperties();
            QUI.Space(SPACE_4);
        }
Exemplo n.º 3
0
        void UpdateAllNavigationData()
        {
#if dUI_DoozyUI
            if (!UIManager.IsNavigationEnabled)
            {
                return;
            }

            DUIUtils.UpdateNavigationDataList(Detector.navigationPointerData.show, editorNavigationData.showIndex);
            DUIUtils.UpdateNavigationDataList(Detector.navigationPointerData.hide, editorNavigationData.hideIndex);
#endif
        }