Skip to content

Commit

Permalink
Tweaked name, tooltips and position of direction cone & emitter size.
Browse files Browse the repository at this point in the history
  • Loading branch information
THDigi committed Jul 25, 2022
1 parent 76a6c22 commit 04341c7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
28 changes: 16 additions & 12 deletions GameData/VersionSpecificInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,28 @@ public static bool IsMaterialSupported(MyTransparentMaterial mat)

[new PropId(MyGPUGenerationPropertiesEnum.DirectionConeVar)] = new PropertyData() // animated 1D float
{
NameOverride = "Direction cone",
ValueRangeNum = new ValueInfo<float>(-360f, 360f), // TODO: are negative values useful here?
NameOverride = $"Radial Shape ({EditorUI.DefaultEmitter.DirectionConeVar.Name})",
TooltipOverride = "Starts from a line 0deg and works its way up to a full sphere at 360deg, affected by Direction.",
ValueRangeNum = new ValueInfo<float>(0f, 360f),
RequiredKeys1D = 0,
},
[new PropId(MyGPUGenerationPropertiesEnum.DirectionInnerCone)] = new PropertyData() // animated 1D float
{
ValueRangeNum = new ValueInfo<float>(-360f, 360f), // TODO: are negative values useful here?
RequiredKeys1D = 0,
},

[new PropId(MyGPUGenerationPropertiesEnum.EmitterSize)] = new PropertyData() // animated 1D Vector3
{
NameOverride = $"Shape Size ({EditorUI.DefaultEmitter.EmitterSize.Name})",
TooltipAddition = "Relies on 'Radial Shape' to determine shape.",
ValueRangeVector3 = new ValueInfo<Vector3>(new Vector3(0), new Vector3(1000000)),
},
[new PropId(MyGPUGenerationPropertiesEnum.EmitterSizeMin)] = new PropertyData() // animated 1D float
{
NameOverride = $"Inner Carve Ratio ({EditorUI.DefaultEmitter.EmitterSizeMin.Name})",
//ValueRangeNum = new ValueInfo<float>(0f, 1f),
},

[new PropId(MyGPUGenerationPropertiesEnum.Acceleration)] = new PropertyData() // Vector3
{
ValueRangeVector3 = new ValueInfo<Vector3>(new Vector3(-100f), new Vector3(100f), round: 3),
Expand All @@ -176,6 +188,7 @@ public static bool IsMaterialSupported(MyTransparentMaterial mat)

[new PropId(MyGPUGenerationPropertiesEnum.Velocity)] = new PropertyData() // animated 1D float
{
TooltipAddition = "If using Radial Shape > 0, this will make particle go outwards from center.",
ValueRangeNum = new ValueInfo<float>(0f, 100f, defaultValue: 0f, round: 1),
RequiredKeys1D = 0,
},
Expand All @@ -188,15 +201,6 @@ public static bool IsMaterialSupported(MyTransparentMaterial mat)
RequiredKeys1D = 0,
},

[new PropId(MyGPUGenerationPropertiesEnum.EmitterSize)] = new PropertyData() // animated 1D Vector3
{
ValueRangeVector3 = new ValueInfo<Vector3>(new Vector3(0), new Vector3(1000000)),
},
[new PropId(MyGPUGenerationPropertiesEnum.EmitterSizeMin)] = new PropertyData() // animated 1D float
{
ValueRangeNum = new ValueInfo<float>(0, 1000000),
},

[new PropId(MyGPUGenerationPropertiesEnum.RotationReference)] = new PropertyData() // enum
{
TooltipAddition = "The 'Local and camera' value does nothing different than 'Local' in SE v201.",
Expand Down
8 changes: 4 additions & 4 deletions TabEmitters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,10 @@ void RefreshEmitterProperties(MyParticleGPUGenerationData emitter)

ScrollHost.PropAnimated(emitter, emitter.ParticlesPerSecond);

ScrollHost.PropAnimated(emitter, emitter.DirectionConeVar);

ScrollHost.PropAnimated(emitter, emitter.DirectionInnerCone);

ScrollHost.PropAnimated(emitter, emitter.EmitterSize);

ScrollHost.PropAnimated(emitter, emitter.EmitterSizeMin);
Expand Down Expand Up @@ -465,10 +469,6 @@ void RefreshEmitterProperties(MyParticleGPUGenerationData emitter)

ScrollHost.PropAnimated(emitter, emitter.AccelerationFactor);

ScrollHost.PropAnimated(emitter, emitter.DirectionConeVar);

ScrollHost.PropAnimated(emitter, emitter.DirectionInnerCone);

ScrollHost.PropCheckbox(emitter, emitter.RotationEnabled);

ScrollHost.PropNumberBox(emitter, emitter.RotationVelocity);
Expand Down

0 comments on commit 04341c7

Please sign in to comment.