Sprites JavaScript Text Media
The text media: an editor for a text screen, a grid of character cells drawn from one font, each cell coloured by an ink and a paper attribute. It is built on the shared pixel parts under Sprites.Media.Sprite, the same canvas, pan and zoom, move, file and history windows and info window a sprite uses, and it reuses the font editor's Characters window for the glyph palette; only the screen model, the Tools window and the character palette are text specific.
Two attribute models
A screen colours its cells one of two ways. A per cell machine gives each cell its own ink and paper. An inline machine lets an attribute take a whole cell and hold along the row until another overrides it, so a cell reads the nearest set value to its left, or the default. A flag on the editor, wholeCell, chooses the model. The full per machine detail lives on the text media page and the platform text pages.
| Machine | Screen | Model |
|---|---|---|
| Spectrum | 32×24 | Per cell |
| C64 | 40×25 | Per cell |
| VGA | 80×25 | Per cell |
| Oric | 40×28 | Inline |
| Teletext | 40×25 | Inline |
Sprites.Media.Text Modules
Two modules are text specific. The rest of the editor is the shared pixel toolkit under Sprites.Media.Sprite and the font editor's characters window.
Sprites.Media.Text
The text screen editor and its model: four flat lists over the cells, resolved by the attribute model and tiled from the font.
Sprites.Media.Text.Tool
The Tools window and the colour palette: the move, char, ink and paper selector over the file, history and characters panels.