Responsibilities02 / 11

Who controls the interface

Separate appearance, data, and interaction.

The toolkit receives a surface and its parameters. It does not choose the screen size, load fonts, or call game commands. The same panel can therefore appear in a menu, shop, or combat HUD.

The application decides

  • layoutSize and position
  • contentText and data
  • inputPress and action
  • timePause and motion

The toolkit draws

  • surfaceBackground and edges
  • iconVector symbol
  • stateItem selection
  • effectAnimation frame
Scene objects remain owned by the application. An effect releases only the resources it creates.

Coordinates use the container’s local logical units. If the parent is scaled by two, the panel and its icons scale together. There is no need to pass physical canvas pixels instead of local dimensions.

We redraw a static surface when its size, palette, or state changes. Animation needs continuous ticker updates; a stationary frame does not.

Sources ↗

Cyber UI Toolkit · README↗Local dimensions and resource ownership contracts.PixiJS · Container↗Object hierarchy and transforms.