예제 #1
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);
     }
 }
예제 #2
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);
     }
 }
예제 #3
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);
     }
 }
 void DrawEvents()
 {
     if (!triggerOnGameEvent.boolValue && !triggerOnButtonClick.boolValue && !triggerOnButtonDoubleClick.boolValue && !triggerOnButtonLongClick.boolValue)
     {
         return;
     }
     if (triggerOnGameEvent.boolValue && (!dispatchAll.boolValue && string.IsNullOrEmpty(gameEvent.stringValue)))
     {
         return;
     }
     if ((triggerOnButtonClick.boolValue || triggerOnButtonDoubleClick.boolValue || triggerOnButtonLongClick.boolValue) && (!dispatchAll.boolValue && string.IsNullOrEmpty(buttonName.stringValue)))
     {
         return;
     }
     SaveColors();
     QUI.SetGUIBackgroundColor(DUIColors.BlueLight.Color);
     QUI.PropertyField(onTriggerEvent, new GUIContent("On Trigger Event"), WIDTH_420);
     RestoreColors();
     QUI.ResetColors();
     if (QUI.Button(DUIStyles.GetStyle(showGameEvents.target ? DUIStyles.ButtonStyle.GameEvents : DUIStyles.ButtonStyle.GameEventsCollapsed), WIDTH_420, 18))
     {
         showGameEvents.target = !showGameEvents.target;
     }
     if (QUI.BeginFadeGroup(showGameEvents.faded))
     {
         SaveColors();
         QUI.SetGUIBackgroundColor(DUIColors.BlueLight.Color);
         QUI.BeginVertical(WIDTH_420);
         {
             QUI.Space(SPACE_2);
             QUI.DrawList(gameEvents, WIDTH_420, "Not sending any Game Event on trigger... Click [+] to start...");
             QUI.Space(SPACE_2);
         }
         QUI.EndVertical();
         RestoreColors();
     }
     QUI.EndFadeGroup();
 }