clone

an offline sliding-block puzzle game in gleam and lustre, with an endless ladder of puzzles ranked by search

The name is the address

Dami committed 8f9d8df
KLOT.SKI, on the title window and beside the maker's mark on the menu bar, from
one constant rather than typed out at each. The stop is part of the word: at
display tracking it reads as the name and not as two of them, and it is the same
string anyone will have typed to arrive.

The menu bar carried PUZZLES, which was doing two jobs — naming the application
where a Macintosh named the application, and labelling the screen underneath it.
It only ever needed to do the first. PUZZLES survives as the button on the win
screen, where it is navigation and not a title.

The tab and the installed app take the name in lower case, since that is how an
address is written.
commit
8f9d8df8c5e9215409ed8cf35798861df32e645d
parent
8c12cb0f85cde116c0907f0b95a068d9855083ab
author
Dami <dami.etoile@gmail.com>
3 files changed, +15 -7
Massets/manifest.webmanifest4++--
Mgleam.toml2+-
Msrc/klotski/paint.gleam16++++++++++++----
M assets/manifest.webmanifest +2 -2
M gleam.toml +1 -1
M src/klotski/paint.gleam +12 -4
@@ -32,6 +32,14 @@ import klotski/store.{type Entry, type FamilyRecord, type Hints, type Totals}
3232 import klotski/theme.{type Rgb, type Theme}3333 import klotski/typeface3434 35+/// The name, set the way the address bar spells it.36+///37+/// It appears twice and in two registers — struck large on the title window,38+/// and small beside the maker's mark where a Macintosh carried the name of the39+/// application — so it is written once here rather than typed out at each. The40+/// stop is part of the word, not punctuation between two of them.41+pub const brand = "KLOT.SKI"42+3543 /// A screen, resolved from a shape and a ruling.3644 pub fn screen_for(pattern: Pattern, ruling: Ruling) -> Screen {3745 Screen(
@@ -173,10 +181,10 @@ pub fn boot(l: Layout, hero: Family, screen: Screen, theme: Theme) -> List(Op) {
173181 // where the window is wide enough to ask for big type and not tall enough to174182 // have anywhere to put it. So the size is capped by the height as well, and175183 // the baseline is never nearer the top of the window than the type is tall.176- // Left to the fraction alone, KLOTSKI is printed through the frame.184+ // Left to the fraction alone, the name is printed through the frame.177185 let title_size =178186 typeface.fit_size(179- "KLOTSKI",187+ brand,180188 float.min(u *. 0.14, int.to_float(win.h) *. 0.19),181189 Display,182190 u *. 0.02,
@@ -215,7 +223,7 @@ pub fn boot(l: Layout, hero: Family, screen: Screen, theme: Theme) -> List(Op) {
215223 scene.panel(win),216224 [217225 Label(218- text: "KLOTSKI",226+ text: brand,219227 x: cx,220228 y: int.to_float(title_y),221229 size: title_size,
@@ -566,7 +574,7 @@ pub fn atlas(
566574 ink: logo,567575 ),568576 Label(569- text: "PUZZLES",577+ text: brand,570578 x: int.to_float(8 + logo_size + 6),571579 y: int.to_float(572580 l.bar_h - float.round(int.to_float(l.bar_h) *. 0.28),