diff --git a/src/TSMapEditor/Config/Actions.ini b/src/TSMapEditor/Config/Actions.ini index b75098f4..16a2ffce 100644 --- a/src/TSMapEditor/Config/Actions.ini +++ b/src/TSMapEditor/Config/Actions.ini @@ -486,7 +486,7 @@ P2Type=Boolean [ParticleSystemAnimAt] Name=ParticleSystem Anim at Description=Show particle animation at waypoint location. -P2Type=Particle +P2Type=ParticleSystem P7Type=WaypointZZ [RemoveParticleSystemAnimAt] diff --git a/src/TSMapEditor/Config/UI/Windows/SelectParticleSystemTypeWindow.ini b/src/TSMapEditor/Config/UI/Windows/SelectParticleSystemTypeWindow.ini new file mode 100644 index 00000000..f7a1c478 --- /dev/null +++ b/src/TSMapEditor/Config/UI/Windows/SelectParticleSystemTypeWindow.ini @@ -0,0 +1,35 @@ +[SelectParticleSystemTypeWindow] +$Width=250 +$Height=RESOLUTION_HEIGHT - 100 +$CC0=lblDescription:XNALabel +$CC1=tbSearch:EditorSuggestionTextBox +$CC2=btnSelect:EditorButton +$CC3=lbObjectList:EditorListBox +HasCloseButton=true + + +[lblDescription] +$X=EMPTY_SPACE_SIDES +$Y=EMPTY_SPACE_TOP +FontIndex=1 +Text=Select Particle System: + +[tbSearch] +$X=EMPTY_SPACE_SIDES +$Y=getBottom(lblDescription) + EMPTY_SPACE_TOP +$Width=getWidth(SelectParticleSystemTypeWindow) - (EMPTY_SPACE_SIDES * 2) +Suggestion=Search Particle System... + +[btnSelect] +$Width=100 +$X=(getWidth(SelectParticleSystemTypeWindow) - getWidth(btnSelect)) / 2 +$Y=getHeight(SelectParticleSystemTypeWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) +Text=Select + +[lbObjectList] +$X=EMPTY_SPACE_SIDES +$Y=getBottom(tbSearch) + VERTICAL_SPACING +$Width=getWidth(tbSearch) +$Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP + + diff --git a/src/TSMapEditor/Models/Enums/RTTIType.cs b/src/TSMapEditor/Models/Enums/RTTIType.cs index fd9c1ae2..8efadbf1 100644 --- a/src/TSMapEditor/Models/Enums/RTTIType.cs +++ b/src/TSMapEditor/Models/Enums/RTTIType.cs @@ -39,6 +39,7 @@ public enum RTTIType TeamType, Waypoint, CellTag, - SuperWeaponType + SuperWeaponType, + ParticleSystemType } } diff --git a/src/TSMapEditor/Models/Enums/TriggerParamType.cs b/src/TSMapEditor/Models/Enums/TriggerParamType.cs index 7a75e9ae..6a66f811 100644 --- a/src/TSMapEditor/Models/Enums/TriggerParamType.cs +++ b/src/TSMapEditor/Models/Enums/TriggerParamType.cs @@ -25,7 +25,7 @@ public enum TriggerParamType Speech, SuperWeapon, Animation, - Particle, + ParticleSystem, Waypoint, WaypointZZ, String, diff --git a/src/TSMapEditor/Models/ParticleSystemType.cs b/src/TSMapEditor/Models/ParticleSystemType.cs new file mode 100644 index 00000000..1b9c87f6 --- /dev/null +++ b/src/TSMapEditor/Models/ParticleSystemType.cs @@ -0,0 +1,24 @@ +using System.Globalization; + +namespace TSMapEditor.Models +{ + public class ParticleSystemType : AbstractObject, INIDefined + { + public ParticleSystemType(string iniName) + { + ININame = iniName; + } + + [INI(false)] + public string ININame { get; } + + [INI(false)] + public int Index { get; set; } + + public string GetDisplayString() => $"{Index.ToString(CultureInfo.InvariantCulture)} {GetDisplayStringWithoutIndex()}"; + + public string GetDisplayStringWithoutIndex() => ININame; + + public override RTTIType WhatAmI() => RTTIType.ParticleSystemType; + } +} diff --git a/src/TSMapEditor/Models/Rules.cs b/src/TSMapEditor/Models/Rules.cs index 40e0e82f..d6047f36 100644 --- a/src/TSMapEditor/Models/Rules.cs +++ b/src/TSMapEditor/Models/Rules.cs @@ -28,6 +28,7 @@ public class Rules public List GlobalVariables = new List(); public List Weapons = new List(); public List SuperWeaponTypes = new List(); + public List ParticleSystemTypes = new List(); public List TaskForces = new List(); public List