コード例 #1
0
        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();
        }
コード例 #2
0
 void DrawCustomGameEvents()
 {
     QUI.DrawTexture(DUIResources.barCustomGameEvents.texture, WIDTH_420, 18);
     //DrawInfoMessage("ComponentInfo", WIDTH_420);
     SaveColors();
     QUI.SetGUIBackgroundColor(DUIColors.PurpleLight.Color);
     QUI.Space(SPACE_2);
     QUI.Label("LoadLevel Async", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), WIDTH_420);
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Space(SPACE_16);
         QUI.Label("by name", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 90);
         QUI.PropertyField(command_LoadSceneAsync_SceneName, 280);
         QUI.BeginVertical(22);
         {
             QUI.Space(-1);
             if (QUI.ButtonReset())
             {
                 command_LoadSceneAsync_SceneName.stringValue = SceneLoader.DEFAULT_LOAD_SCENE_ASYNC_SCENE_NAME;
             }
         }
         QUI.EndVertical();
     }
     QUI.EndHorizontal();
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Space(SPACE_16);
         QUI.Label("by build index", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 90);
         QUI.PropertyField(command_LoadSceneAsync_SceneBuildIndex, 280);
         QUI.BeginVertical(22);
         {
             QUI.Space(-1);
             if (QUI.ButtonReset())
             {
                 command_LoadSceneAsync_SceneBuildIndex.stringValue = SceneLoader.DEFAULT_LOAD_SCENE_ASYNC_SCENE_BUILD_INDEX;
             }
         }
         QUI.EndVertical();
     }
     QUI.EndHorizontal();
     QUI.Space(SPACE_8);
     QUI.Label("LoadLevel Additive Async", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), WIDTH_420);
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Space(SPACE_16);
         QUI.Label("by name", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 90);
         QUI.PropertyField(command_LoadSceneAdditiveAsync_SceneName, 280);
         QUI.BeginVertical(22);
         {
             QUI.Space(-1);
             if (QUI.ButtonReset())
             {
                 command_LoadSceneAdditiveAsync_SceneName.stringValue = SceneLoader.DEFAULT_LOAD_SCENE_ADDITIVE_ASYNC_SCENE_NAME;
             }
         }
         QUI.EndVertical();
     }
     QUI.EndHorizontal();
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Space(SPACE_16);
         QUI.Label("by build index", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 90);
         QUI.PropertyField(command_LoadSceneAdditiveAsync_SceneBuildIndex, 280);
         QUI.BeginVertical(22);
         {
             QUI.Space(-1);
             if (QUI.ButtonReset())
             {
                 command_LoadSceneAdditiveAsync_SceneBuildIndex.stringValue = SceneLoader.DEFAULT_LOAD_SCENE_ADDITIVE_ASYNC_SCENE_BUILD_INDEX;
             }
         }
         QUI.EndVertical();
     }
     QUI.EndHorizontal();
     QUI.Space(SPACE_8);
     QUI.Label("Unload Scene", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), WIDTH_420);
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Space(SPACE_16);
         QUI.Label("by name", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 90);
         QUI.PropertyField(command_UnloadScene_SceneName, 280);
         QUI.BeginVertical(22);
         {
             QUI.Space(-1);
             if (QUI.ButtonReset())
             {
                 command_UnloadScene_SceneName.stringValue = SceneLoader.DEFAULT_UNLOAD_SCENE_SCENE_NAME;
             }
         }
         QUI.EndVertical();
     }
     QUI.EndHorizontal();
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Space(SPACE_16);
         QUI.Label("by build index", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 90);
         QUI.PropertyField(command_UnloadScene_SceneBuildIndex, 280);
         QUI.BeginVertical(22);
         {
             QUI.Space(-1);
             if (QUI.ButtonReset())
             {
                 command_UnloadScene_SceneBuildIndex.stringValue = SceneLoader.DEFAULT_UNLOAD_SCENE_SCENE_BUILD_INDEX;
             }
         }
         QUI.EndVertical();
     }
     QUI.EndHorizontal();
     QUI.Space(SPACE_8);
     QUI.Label("Load / Unload Level", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), WIDTH_420);
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Space(SPACE_16);
         QUI.Label("load level", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 90);
         QUI.PropertyField(command_LoadLevel, 280);
         QUI.BeginVertical(22);
         {
             QUI.Space(-1);
             if (QUI.ButtonReset())
             {
                 command_LoadLevel.stringValue = SceneLoader.DEFAULT_LOAD_LEVEL;
             }
         }
         QUI.EndVertical();
     }
     QUI.EndHorizontal();
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Space(SPACE_16);
         QUI.Label("unload level", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 90);
         QUI.PropertyField(command_UnloadLevel, 280);
         QUI.BeginVertical(22);
         {
             QUI.Space(-1);
             if (QUI.ButtonReset())
             {
                 command_UnloadLevel.stringValue = SceneLoader.DEFAULT_UNLOAD_LEVEL;
             }
         }
         QUI.EndVertical();
     }
     QUI.EndHorizontal();
     QUI.Space(SPACE_2);
     QUI.Label("Level Scene Name (naming convention)", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), WIDTH_420);
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Space(SPACE_16);
         QUI.Label("scene name", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 90);
         QUI.PropertyField(levelSceneName, 280);
         QUI.BeginVertical(22);
         {
             QUI.Space(-1);
             if (QUI.ButtonReset())
             {
                 levelSceneName.stringValue = SceneLoader.DEFAULT_LEVEL_SCENE_NAME;
             }
         }
         QUI.EndVertical();
     }
     QUI.EndHorizontal();
     QUI.Space(SPACE_8);
     QUI.Label("Game Event sent after a scene was loaded", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelNormal), WIDTH_420);
     QUI.BeginHorizontal(WIDTH_420);
     {
         QUI.Space(SPACE_16);
         QUI.Label("game event", DUIStyles.GetStyle(DUIStyles.TextStyle.LabelSmall), 90);
         QUI.PropertyField(levelLoadedGameEvent, 280);
         QUI.BeginVertical(22);
         {
             QUI.Space(-1);
             if (QUI.ButtonReset())
             {
                 levelLoadedGameEvent.stringValue = SceneLoader.DEFAULT_LEVEL_LOADED;
             }
         }
         QUI.EndVertical();
     }
     QUI.EndHorizontal();
     QUI.Space(SPACE_4);
 }