Skip to content

SaveSlot

namespace Griff.Scenes;
public sealed class SaveSlot : Component, IDrawable

Shows a saved game’s slot, for a save or load screen: the game’s screenshot, when it was saved, and the line being said then (or “Empty”). Put it on a Button whose Action is Save Game (to save in this slot), Load Game or Delete Save: a button set to one of those with no Slot of its own, on this entity or inside it, uses this one’s. Entity → Genres → Visual Novels → Reading Menus makes save and load screens of them.

This is a component: its saved properties are on its component page.

public string Description { get; }

What it says now: the game saved there, as its Format says (each line no wider than the screenshot, and at most three of them), or its EmptyText. Kept up to date by the game.

public Color EmptyColor { get; set; }

The color filling the screenshot’s place while there’s none.

public string? EmptyText { get; set; }

What it says while nothing is saved there.

public string? Format { get; set; }

What it says about the game saved there: “{slot}” is the slot’s name, “{date}” and “{time}” when it was saved, “{scene}” the scene’s name and “{line}” the line being said (or the scene’s name).

public bool HasSave { get; }

True while a game is saved in it. Kept up to date by the game.

public int Order { get; set; }

Higher draws on top, like Order.

public string? Picture { get; }

The name its screenshot is drawn by (“@save/1”), or null while it has none. Kept up to date by the game.

public float PictureAspect { get; }

Its screenshot’s width over its height, to fit it in PictureSize without stretching it; 0 with none.

public Vector2 PictureOffset { get; set; }

Where the screenshot’s middle is, from the entity’s.

public Vector2 PictureSize { get; set; }

How big the screenshot is, in world units.

public string? Slot { get; set; }

The slot’s name: “1”, “2”… or one of your own (“Chapter 2”). “Quick” is the one quick saves use.

public Color TextColor { get; set; }

The color of its words.

public Vector2 TextOffset { get; set; }

Where its words’ first line is, from the entity’s middle.

public float TextSize { get; set; }

How tall its words are.

public static string Fill(string format, string slot, DateTimeOffset saved, string? scene, string line)

format filled in for a game saved in slot at saved: “{slot}”, “{date}” (“15 Oct 2026”), “{time}” (“14:03”), “{scene}” and “{line}” (the line being said, or the scene’s name).

public string ReadsAs(string? format)

What it says with format as its Format about a game saved there now, on a line of talk: for the Inspector to show how it reads.