Log inGet started
World

Turquoise Cay

README.md

displays

The kit's eight on-screen clocks: digital, analog, arc, minimal, pixel (a retro 8-bit clock), scifi (a HUD readout), sundial (a fantasy stone sundial) and moondial (the moon's phase). All take the same options, so swapping is a change of name. A game calls one function and a clock appears and keeps itself in step with the shared world clock (edit and play), until it is hidden.

local Displays = require("worldClockKit.displays")
local h = Displays.show("analog", { anchor = "bottomRight", scale = 1.2 })
Displays.hide(h)
stylewhat it shows
digitalRounded glass panel: big HH:MM, "Day 3 · Spring" with a phase dot, and a weather chip (icon + label).
analogCream clock face with 12 hour ticks and turning hour and minute hands, with the day number in a pill underneath.
arcHorizon arc: the sun travels it from sunrise to sunset, the moon (drawn in its phase) at night, with sunrise and sunset times and the time and phase underneath.
minimalSmall HH:MM with a soft shadow, nothing else.
  • Displays.show(style, opts?) -> handle. opts: anchor (topLeft, topRight, bottomLeft, bottomRight, topCenter, bottomCenter), scale (default 1), twelveHour (bool), margin (a number, or {top, right, bottom, left} in UI points, default 16), layer (UI layer, default 15).
  • Displays.hide(handle), Displays.hideAll(), Displays.shown().
  • Displays.styles() returns a copy of Displays.STYLES; Displays.describe(style) returns { label, tags, description } (the catalog reads it).

Any number of displays can be shown at once. Each is its own screen (wckClock_<n>) with a transparent full-screen root that takes no clicks. One shared loop reads the clock once per frame and re-renders a display only when what it shows has changed. On a narrow (phone) screen they draw at 82% size, and they stay inside the safe area.