// pass field into a drop down list [change first value in DropDownList] public int SetValues(int selectedValue, int titleWidth) { int result = SimpleLayout.DropDownList(selectedValue, field, titleWidth, 150); result = (result == 0) ? 1 : result; return(result); }
/// <summary> /// Draw exp meter /// </summary> private static void DrawExpMeter() { SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); SimpleLayout.BeginHorizontal(); boolFields[6].value = SimpleLayout.BoolField(boolFields[6].value); SimpleLayout.Label("Ability has Experience Meter"); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); if (boolFields[6].value) { SimpleLayout.BeginHorizontal(); intFields[11].value = SimpleLayout.IntField(intFields[11].value); SimpleLayout.Label("Experience gained per use of this ability"); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); SimpleLayout.BeginHorizontal(); intFields[10].value = SimpleLayout.IntField(intFields[10].value); SimpleLayout.Label("Experience needed to morph ability"); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); DropDownValues itemList = HeroKitCommon.databaseList(HeroKitCommon.abilityDatabase); SimpleLayout.BeginHorizontal(); intFields[12].value = SimpleLayout.DropDownList(intFields[12].value, itemList, 0, HeroKit.Editor.HeroKitCommon.GetWidthForField(60, 250)); SimpleLayout.Label("Morph into..."); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); } SimpleLayout.EndVertical(); }
/// <summary> /// Draw item type /// </summary> private static void DrawUsesAmmo() { SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); SimpleLayout.BeginHorizontal(); SimpleLayout.Label("Uses Ammunition" + ":"); boolFields[3].value = SimpleLayout.BoolField(boolFields[3].value); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); if (boolFields[3].value) { SimpleLayout.Space(5); SimpleLayout.Line(); // item type field DropDownValues itemList = HeroKitCommon.databaseList(HeroKitCommon.ammunitionTypeDatabase); SimpleLayout.BeginHorizontal(); intFields[2].value = SimpleLayout.DropDownList(intFields[2].value, itemList, 0, HeroKit.Editor.HeroKitCommon.GetWidthForField(60, 200)); SimpleLayout.Label("Ammunition type"); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); SimpleLayout.BeginHorizontal(); intFields[3].value = SimpleLayout.IntField(intFields[3].value); SimpleLayout.Label("Range (in meters)"); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); } SimpleLayout.EndVertical(); }
// pass field into a drop down list [change first value in DropDownList] public static int SetValues(HeroObject heroObject, int stateIndex, int eventIndex, int titleWidth) { int result = SimpleLayout.DropDownList(heroObject.states.states[stateIndex].heroEvent[eventIndex].messageSettings[3], field, titleWidth); result = (result == 0) ? 1 : result; return(result); }
/// <summary> /// Draw item type /// </summary> private static void DrawTarget2() { SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); SimpleLayout.BeginHorizontal(); SimpleLayout.Label("Uses Ammunition" + ":"); boolFields[3].value = SimpleLayout.BoolField(boolFields[3].value); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); if (boolFields[3].value) { SimpleLayout.Space(5); SimpleLayout.Line(); // item type field string[] items = { "Another Character", "Caster" }; DropDownValues itemList = new DropDownValues(); itemList.setValues("", items); SimpleLayout.BeginHorizontal(); intFields[1].value = SimpleLayout.DropDownList(intFields[1].value, itemList, 0, HeroKit.Editor.HeroKitCommon.GetWidthForField(60, 200)); SimpleLayout.Label("Target"); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); SimpleLayout.BeginHorizontal(); intFields[17].value = SimpleLayout.IntField(intFields[17].value); SimpleLayout.Label("Range (in meters)"); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); } SimpleLayout.EndVertical(); }
private static void DrawTimerEndCond() { SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); SimpleLayout.BeginHorizontal(); boolFields[0].value = SimpleLayout.BoolField(boolFields[0].value); SimpleLayout.Label("Turn off condition with timer"); SimpleLayout.EndHorizontal(); if (boolFields[0].value) { SimpleLayout.Line(); // list of stat change types DropDownValues changeTypeValues = new DropDownValues(); string[] changeType = { "Seconds", "Minutes", "Hours" }; changeTypeValues.setValues("", changeType); SimpleLayout.BeginHorizontal(); intFields[0].value = SimpleLayout.DropDownList(intFields[0].value, changeTypeValues, 0, 150); intFields[1].value = SimpleLayout.IntField(intFields[1].value, 150); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); } SimpleLayout.EndVertical(); }
// pass field into a drop down list [change first value in DropDownList] public int SetValues(int selectedValue, List <HeroState> list, int titleWidth) { PopulateField(list); int result = SimpleLayout.DropDownList(selectedValue, field, titleWidth, width); return(result); }
// pass field into a drop down list [change first value in DropDownList] public static int SetValues(HeroObject heroObject, int stateIndex, int eventIndex, int listIndex, int conditionIndex, int titleWidth) { int result = SimpleLayout.DropDownList(heroObject.states.states[stateIndex].heroEvent[eventIndex].inputConditions[listIndex].items[conditionIndex].pressType, field, titleWidth); result = (result == 0) ? 1 : result; return(result); }
// pass field into a drop down list [change first value in DropDownList] public int SetValuesInspector(int selectedValue, string title) { int result = SimpleLayout.DropDownList(selectedValue, field, title); result = (result == 0) ? 1 : result; return(result); }
/// <summary> /// Draw item type /// </summary> private static void DrawRange() { // item type field string[] items = { "Projectile launched at target", "Everything within radius around Caster", "Directly on Target" }; DropDownValues itemList = new DropDownValues(); itemList.setValues("", items); SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); SimpleLayout.BeginHorizontal(); intFields[2].value = SimpleLayout.DropDownList(intFields[2].value, itemList, 0, HeroKit.Editor.HeroKitCommon.GetWidthForField(60, 200)); SimpleLayout.Label("How ability is used"); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); // projectile or radius if (intFields[2].value == 1 || intFields[2].value == 2) { SimpleLayout.BeginHorizontal(); intFields[3].value = SimpleLayout.IntField(intFields[3].value); SimpleLayout.Label("Range (in meters)"); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); } // projectile if (intFields[2].value == 1) { SimpleLayout.BeginHorizontal(); intFields[4].value = SimpleLayout.IntField(intFields[4].value); SimpleLayout.Label("Speed of projectile"); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); // particle effect on target SimpleLayout.BeginHorizontal(); uoFields[3].value = SimpleLayout.ObjectField(uoFields[3].value as ParticleSystem, HeroKit.Editor.HeroKitCommon.GetWidthForField(60, 200)); SimpleLayout.Label("Particle effect for projectile"); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); } // particle effect on target SimpleLayout.BeginHorizontal(); uoFields[2].value = SimpleLayout.ObjectField(uoFields[2].value as ParticleSystem, HeroKit.Editor.HeroKitCommon.GetWidthForField(60, 200)); SimpleLayout.Label("Particle effect on target"); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); // particle effect on caster SimpleLayout.BeginHorizontal(); uoFields[1].value = SimpleLayout.ObjectField(uoFields[1].value as ParticleSystem, HeroKit.Editor.HeroKitCommon.GetWidthForField(60, 200)); SimpleLayout.Label("Particle effect on caster"); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); SimpleLayout.EndVertical(); }
// pass field into a drop down list [change first value in DropDownList] public int SetValuesInspector(int selectedValue, List <HeroState> list, string title) { PopulateField(list); int result = SimpleLayout.DropDownList(selectedValue, field, title); result = (result == 0 && list != null && list.Count != 0) ? 1 : result; return(result); }
// pass field into a drop down list [change first value in DropDownList] public static int SetValues(List <FloatField> list, int selectedValue, int titleWidth) { PopulateField(list); int result = SimpleLayout.DropDownList(selectedValue, field, titleWidth); result = (result == 0 && list != null && list.Count != 0) ? 1 : result; return(result); }
// pass field into a drop down list [change first value in DropDownList] public static int SetValues(HeroProperties[] list, int selectedValue, int titleWidth) { PopulateField(list); int result = SimpleLayout.DropDownList(selectedValue, field, titleWidth, 150); result = (result == 0 && list != null && list.Length != 0) ? 1 : result; return(result); }
// pass field into a drop down list [change first value in DropDownList] public static int SetValues(FieldInfo[] list, int selectedValue, int titleWidth) { PopulateField(list); int result = SimpleLayout.DropDownList(selectedValue, field, titleWidth, HeroKitCommon.GetWidthForField(62)); result = (result == 0 && list != null && list.Length != 0) ? 1 : result; return(result); }
// pass field into a drop down list [change first value in DropDownList] public static int SetValues(int selectedValue, int titleWidth) { PopulateField(); int result = SimpleLayout.DropDownList(selectedValue, field, titleWidth); result = (result == 0) ? 1 : result; return(result); }
/// <summary> /// Draw item type /// </summary> private static void DrawSuccess() { // item type field string[] items = { "100%", "95%", "90%", "85%", "80%", "75%", "70%", "65%", "60%", "55%", "50%", "45%", "40%", "35%", "30%", "25%", "20%", "15%", "15%", "5%" }; DropDownValues itemList = new DropDownValues(); itemList.setValues("", items); SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); SimpleLayout.BeginHorizontal(); intFields[5].value = SimpleLayout.DropDownList(intFields[5].value, itemList, 0, HeroKit.Editor.HeroKitCommon.GetWidthForField(60, 200)); SimpleLayout.Label("Chance of success"); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); SimpleLayout.EndVertical(); }
/// <summary> /// Draw item type /// </summary> private static void DrawTarget() { // item type field string[] items = { "Enemies", "Friends", "Caster", "Enemies and Friends", "All" }; DropDownValues itemList = new DropDownValues(); itemList.setValues("", items); // item type field string[] scope = { "All", "Some", "One" }; DropDownValues scopeList = new DropDownValues(); scopeList.setValues("", scope); SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); SimpleLayout.BeginHorizontal(); intFields[1].value = SimpleLayout.DropDownList(intFields[1].value, itemList, 0, HeroKit.Editor.HeroKitCommon.GetWidthForField(60, 250)); SimpleLayout.Label("Target"); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); SimpleLayout.BeginHorizontal(); intFields[7].value = SimpleLayout.DropDownList(intFields[7].value, scopeList, 0, HeroKit.Editor.HeroKitCommon.GetWidthForField(60, 250)); SimpleLayout.Label("Scope"); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); if (intFields[7].value == 2) { SimpleLayout.BeginHorizontal(); intFields[8].value = SimpleLayout.IntField(intFields[8].value); SimpleLayout.Label("Max number of targets"); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); SimpleLayout.BeginHorizontal(); boolFields[4].value = SimpleLayout.BoolField(boolFields[4].value); SimpleLayout.Label("Random"); SimpleLayout.Space(); SimpleLayout.EndHorizontal(); } SimpleLayout.EndVertical(); }