Skip to main content
Links, hints and selectable text

Links, hints and selectable text

· 2 min read
Balaur

A label is no longer just a picture of its text. Marks in it can be clicked and hovered, a drag selects it, and a number carries units.

A label with a link and a hint, a selectable line, and two numbers with arrows and units

  • A [url=target] span wears the theme's link colour and an underline, the pointer over it is a hand, and a click calls on_link with the target. What to do with it is the game's: a scene, a shop, a browser.
  • A [hint=text] span says something while the pointer rests on it. The hover text belongs to the span, not to the whole label.
  • With selectable, a drag selects, the platform's copy key takes it, double click takes a word and treble takes the block. A seed or an error code is now something a player can send you.
  • A drag_value with arrows draws a step up and a step down inside its own box, each moving by step within min and max, and suffix puts the units after the number: 12 px, 4.5 m/s.

Labels are still shaped by the engine's own text stack. That is what keeps right-to-left runs in order, holds one glyph atlas behind the HUD and the world, and measures a width a headless run agrees with.