コード例 #1
0
ファイル: IfFloatFields.cs プロジェクト: antfitch/HeroKit
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 4);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            // Field: Skip (hidden, only for else if)
            GetConditionalField.BuildField(actionParams, heroAction.actionFields[0]);

            // Field: Integer A
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetFloatField.BuildFieldB("Float A:", actionParams, heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            // Field: Operator
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetDropDownField.BuildField("Operator:", actionParams, heroAction.actionFields[2], new OperatorField());
            SimpleLayout.EndVertical();

            // Field: Integer B
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetFloatField.BuildFieldA("Float B:", actionParams, heroAction.actionFields[3]);
            SimpleLayout.EndVertical();
        }
コード例 #2
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 3);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            // Field: bottom value
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetFloatField.BuildFieldA("Lowest value:", actionParams, heroAction.actionFields[0]);
            SimpleLayout.EndVertical();

            // Field: top value
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetFloatField.BuildFieldA("Highest value:", actionParams, heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            // Field: save result here
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetFloatField.BuildFieldB("Save result here:", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();
        }
コード例 #3
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 3);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            HeroObject targetHO = GetHeroObjectField.BuildFieldC("Get float from this hero object template:", actionParams, heroAction.actionFields[0]);

            if (targetHO != null)
            {
                GetFloatField.BuildFieldC("The float:", actionParams, heroAction.actionFields[1], targetHO);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetFloatField.BuildFieldB("Save the float here:", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();
        }
コード例 #4
0
ファイル: LoadSettingFields.cs プロジェクト: antfitch/HeroKit
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 3);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetStringField.BuildFieldA("Name of the setting:", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            int valueType = GetDropDownField.BuildField("Type of value to load:", actionParams, heroAction.actionFields[0], new PlayerPrefTypeField());

            if (valueType != 0)
            {
                SimpleLayout.Label("Save the value here:");
            }

            if (valueType == 1)
            {
                GetIntegerField.BuildFieldB("", actionParams, heroAction.actionFields[1]);
            }
            else if (valueType == 2)
            {
                GetFloatField.BuildFieldB("", actionParams, heroAction.actionFields[1]);
            }
            else if (valueType == 3)
            {
                GetBoolField.BuildFieldB("", actionParams, heroAction.actionFields[1]);
            }
            else if (valueType == 4)
            {
                GetStringField.BuildFieldB("", actionParams, heroAction.actionFields[1]);
            }
            SimpleLayout.EndVertical();
        }
コード例 #5
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 3);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetFloatField.BuildFieldB("Float A:", actionParams, heroAction.actionFields[0]);
            GetDropDownField.BuildField("Operator:", actionParams, heroAction.actionFields[1], new MathOperatorField());
            GetFloatField.BuildFieldA("Float B:", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();
        }
コード例 #6
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 3);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetSceneObjectValue.BuildField("slider", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetFloatField.BuildFieldB("Save the value in the slider here:", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();
        }
コード例 #7
0
ファイル: GetRotationFields.cs プロジェクト: antfitch/HeroKit
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 8);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetSceneObjectValue.BuildField("rotation", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeX = GetBoolValue.BuildField("Save X Angle?", actionParams, heroAction.actionFields[2], true);

            if (changeX)
            {
                GetFloatField.BuildFieldB("", actionParams, heroAction.actionFields[3]);
            }
            bool changeY = GetBoolValue.BuildField("Save Y Angle?", actionParams, heroAction.actionFields[4], true);

            if (changeY)
            {
                GetFloatField.BuildFieldB("", actionParams, heroAction.actionFields[5]);
            }
            bool changeZ = GetBoolValue.BuildField("Save Z Angle?", actionParams, heroAction.actionFields[6], true);

            if (changeZ)
            {
                GetFloatField.BuildFieldB("", actionParams, heroAction.actionFields[7]);
            }
            SimpleLayout.EndVertical();
        }