Home / Samples / Samples/Creator
A 2D application with no 3D pass at all: one line in the constructor turns the renderer into an overlay compositor, and the rest is panels, text, shapes and sprites. It is the smallest useful starting point for a tool, and it builds from a fresh clone.
internal App()
{
Title = "Creator";
RenderDomain = RenderDomain.Overlay; // no 3D pass, no depth, no post
StorageService.DirectoryBase = "Creator";
BackgroundColor = Season.Basic.Colors.White;
BasicResolution = new Vector2(1280, 720);
}
RenderDomain.Overlay buys
The scene passes are skipped entirely — no depth buffer, no shadow atlas, no post-processing chain, no compute effects. A 2D application therefore does not pay for the renderer it is not using, and it starts instantly. This is the setting to reach for when you are building a tool, a launcher or a 2D game; see 2D controls.
Create() starts a background task that builds four MSDF atlases
before setting a FontsCreated flag. Nothing waits on it; panels
render as soon as their font exists.
var fontInstance = await Season.Fonts.Font.CreateAsync(font.File, font.Size);
Season.Fonts.Font.Instance.Add(fontInstance);
| Font | Why it is there |
|---|---|
| NotoSansMono | Latin and the monospaced content in the composer. |
| NotoSansSC, NotoSansTC | Simplified and traditional Chinese. Loaded separately rather than merged. |
| Twemoji | Colour emoji, from the COLR build of the Twemoji set. |
Each CreateAsync call is wrapped in a
try that logs and continues, so a missing or corrupt font file
costs you that font rather than the application. Worth copying.
| Panel | What it is |
|---|---|
Left | The sidebar: a search field, shortcuts and a scrolling list. |
Page | The content area, switching between the Chat, Folder, Task and Setting panels. |
Top | The title bar, 105 pixels tall, positioned against the content area rather than the window. |
Bar | The bottom bar used in portrait layouts, with the same four destinations as the sidebar. |
Commands | The command strip: collapse the sidebar, capture the screen, create, choose a folder, open settings. |
Chat, Composer | A scrolling list and the editor beneath it. |
Folder, Task, Setting | The other three content panels. |
Controls in use: Texts,
Sprite2D and Shape for everything
drawn, plus the ready-made Input,
MovePanel and
SimplePicker panels from
Season.Panels for text entry, scrolling and list selection. No 3D
control appears anywhere.
There is no layout system, so responsiveness is an if. Landscape
gets the sidebar and hides the bottom bar; portrait does the reverse. Both branches then assign
sizes directly.
if (App.Instance.ExtendResolution.X >= App.Instance.ExtendResolution.Y)
Animation = Animation.HorizontalLeft; // sidebar layout
else
Animation = Animation.Vertical; // bottom-bar layout
// ... then, in the sidebar branch:
Page.PosX = (int)Left.Width;
Page.Width = (int)App.Instance.ExtendResolution.X - Page.PosX;
Page.InnerHeight = (int)(App.Instance.ExtendResolution.Y - (Top.Height ?? 0));
The sidebar slide is written out by hand as well: an
Animation enum with
LeftFadeIn and
LeftFadeOut states, an accumulator, and a
Page.PosX interpolated over
AnimationTime = 0.5f. Eleven lines, no tween library, and the state
machine is visible in one place.
Commands is updated first, and its return value short-circuits
the rest of Update. A click consumed by the command strip never
reaches the panels behind it — that is the whole mechanism, and it is why the topmost
thing is updated first.
This is an application demo, not a game. It shows the control layer, the panel composition model, asynchronous font loading, hand-written responsive layout and persisted settings — which is most of what a desktop tool needs and none of what a game needs.
It also builds and runs from a fresh clone, which
Apps/Engine currently does not. If you
want to see the engine start up on your machine in the next five minutes, start here.
dotnet run --project Samples/Creator -f net10.0-windows10.0.19041.0
dotnet run --project Samples/Creator -f net10.0 # Linux