Files
sbox-public/game/addons/tools/Code/ShaderGraph/Parameter.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

44 lines
943 B
C#

using System.Text.Json.Serialization;
namespace Editor.ShaderGraph;
public enum UIType
{
Default,
Slider,
Color,
}
public struct ParameterUI
{
/// <summary>
/// Control type used in the material editor
/// </summary>
public UIType Type { get; set; }
/// <summary>
/// Step amount for sliders
/// </summary>
public float Step { get; set; }
/// <summary>
/// Priority of this value in the group
/// </summary>
public int Priority { get; set; }
/// <summary>
/// Primary group
/// </summary>
[InlineEditor( Label = false ), Group( "Group" )]
public UIGroup PrimaryGroup { get; set; }
/// <summary>
/// Group within the primary group
/// </summary>
[InlineEditor( Label = false ), Group( "Sub Group" )]
public UIGroup SecondaryGroup { get; set; }
[JsonIgnore, Hide]
public readonly string UIGroup => $"{PrimaryGroup.Name},{PrimaryGroup.Priority}/{SecondaryGroup.Name},{SecondaryGroup.Priority}/{Priority}";
}