* dehardcode nodeTreeControl part 1 * finish * demiplane map system setup * link map entity with station data! * random demiplane map generation * redesign demiplane map node tree * center * map generate v2 * location generation * modifier generation * missing location icons * ui polish * data refactor * fix line color * ejectabling * split demiplane component into two * blocker attempt * revoking * fix frontier calculation * dimensit * demiplane core room spawning * demiplane cool destruction * Update round_end.yml * progression works now! * Update CP14NodeTree.cs * Update CP14NodeTree.cs * documentation pass * fix abusing, some balance pass * demiplane naming fix * см * location names * delete old keys * Update buy.yml * Update migration.yml * fix guidebook * Update misc.yml * Update misc.yml
39 lines
1.7 KiB
C#
39 lines
1.7 KiB
C#
using System.Numerics;
|
|
using Robust.Shared.Serialization;
|
|
using Robust.Shared.Utility;
|
|
|
|
namespace Content.Client._CP14.UserInterface.Systems.NodeTree;
|
|
|
|
public sealed class CP14NodeTreeElement(string nodeKey, bool gained ,bool active, Vector2 uiPosition, SpriteSpecifier? icon = null)
|
|
{
|
|
public string NodeKey = nodeKey;
|
|
public bool Gained = gained;
|
|
public bool Active = active;
|
|
|
|
public Vector2 UiPosition = uiPosition;
|
|
public SpriteSpecifier? Icon = icon;
|
|
}
|
|
|
|
public sealed class CP14NodeTreeUiState(
|
|
HashSet<CP14NodeTreeElement> nodes,
|
|
HashSet<(string, string)>? edges = null,
|
|
SpriteSpecifier? frameIcon = null,
|
|
SpriteSpecifier? hoveredIcon = null,
|
|
SpriteSpecifier? selectedIcon = null,
|
|
SpriteSpecifier? learnedIcon = null,
|
|
Color? lineColor = null,
|
|
Color? activeLineColor = null
|
|
) : BoundUserInterfaceState
|
|
{
|
|
public HashSet<CP14NodeTreeElement> Nodes = nodes;
|
|
public HashSet<(string, string)> Edges = edges ?? new HashSet<(string, string)>();
|
|
|
|
public SpriteSpecifier FrameIcon = frameIcon ?? new SpriteSpecifier.Rsi(new ResPath("/Textures/_CP14/Interface/NodeTree/default.rsi"), "frame");
|
|
public SpriteSpecifier HoveredIcon = hoveredIcon ?? new SpriteSpecifier.Rsi(new ResPath("/Textures/_CP14/Interface/NodeTree/default.rsi"), "hovered");
|
|
public SpriteSpecifier SelectedIcon = selectedIcon?? new SpriteSpecifier.Rsi(new ResPath("/Textures/_CP14/Interface/NodeTree/default.rsi"), "selected");
|
|
public SpriteSpecifier LearnedIcon = learnedIcon?? new SpriteSpecifier.Rsi(new ResPath("/Textures/_CP14/Interface/NodeTree/default.rsi"), "learned");
|
|
|
|
public Color LineColor = lineColor ?? Color.Gray;
|
|
public Color ActiveLineColor = activeLineColor ?? Color.White;
|
|
}
|