Repository navigation
Expand file tree
/
Copy pathForgeMicroBundle.cs
More file actions
90 lines (74 loc) · 3.2 KB
/
Copy pathForgeMicroBundle.cs
File metadata and controls
90 lines (74 loc) · 3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
using TheSingularityWorkshop.FSM_COS;
using TheSingularityWorkshop.MicroBundleDomain;
using TheSingularityWorkshop.Workshop.Gui;
namespace TheSingularityWorkshop.AnyApp;
/// <summary>
/// The Forge entry Experience. It is the user's diegetic Workshop entry point:
/// composition produces the space, while the host wires navigation into it.
/// </summary>
public sealed class ForgeMicroBundle : IMicroBundle, IAnyAppSurface
{
public const ulong ExperienceId = 3201;
public const ulong RuntimeId = 3211;
public const ulong BundleId = 3201;
public const string ProviderId = "workshop-forge";
private GuiNode? _root;
public MicroBundleDescriptor Descriptor { get; } =
new(BundleId, "1.0.0", providers: [new MicroBundleProvider(ProviderId)]);
public ulong Id => Descriptor.Id;
public IReadOnlyList<BundleRequest> Dependencies => [];
public GuiNode Root =>
_root ?? throw new InvalidOperationException(
"The Forge GUI surface is not available until FSM_COS has loaded the bundle.");
public void Load(MicroBundleLoadContext context)
{
ArgumentNullException.ThrowIfNull(context);
var portal = GuiBuilders.Button(
"forge-explore",
"EXPLORE EXPERIENCES →")
.Property("width", "360")
.Property("height", "72")
.Property("margin", "12")
.Property("fontSize", "18")
.Property("fontWeight", "700")
.Property("fontFamily", "Consolas")
.Property("foreground", "#FFFFFF")
.Property("background", "#061A2A")
.Property("horizontalAlignment", "Center")
.Property("tooltip", "Enter the Experience district");
var column = GuiBuilders.Column("forge-column")
.Property("horizontalAlignment", "Center")
.Property("verticalAlignment", "Center")
.Property("padding", "28");
column.Child(
GuiBuilders.Text("forge-kicker", "THE SINGULARITY WORKSHOP / FORGE")
.Property("foreground", "#00A8FF")
.Property("fontSize", "14")
.Property("fontWeight", "700")
.Property("fontFamily", "Consolas")
.Property("margin", "0,0,0,18"));
column.Child(
GuiBuilders.Text("forge-title", "THE FORGE")
.Property("foreground", "#FFFFFF")
.Property("fontSize", "64")
.Property("fontWeight", "700")
.Property("fontFamily", "Consolas")
.Property("margin", "0,0,0,10"));
column.Child(
GuiBuilders.Text("forge-subtitle", "Build it. Enter it. Follow the rabbit hole.")
.Property("foreground", "#A6BCD0")
.Property("fontSize", "17")
.Property("fontFamily", "Consolas")
.Property("margin", "0,0,0,28"));
column.Child(portal);
_root = GuiBuilders.Panel("forge-root")
.Property("background", "#020711")
.Child(column)
.Build();
}
public bool Arbitrate(ArbitrationContext context, int roundIndex)
{
ArgumentNullException.ThrowIfNull(context);
return false;
}
}