Skip to main content

Module cursor

Module cursor 

Source
Expand description

How the glyph skin draws the cursor (game ADR-0024): thin corner marks around the tile, or a glow on it.

Structs§

CursorInk
How the cursor looks: its color, the color it fades toward as it pulses (the console’s background, which a light theme makes light), and how many pixels at a tile’s foot its lower arms keep clear of (a game’s HP bar).

Constants§

CORNER_ARM
How long each arm of the corner marks is, in pixels.
GLOW_MAX
How strongly the tile glow tints the tile at full brightness (0 = not at all, 1 = solid cursor colour). Tunable.
LARGE_CORNER_ARM
How long each arm of the large corner marks is, in pixels.

Functions§

corner_arms
The eight 1 px arms of the corner marks around the tile whose left cell is (x, y), each arm px long, in console pixels, the lower ones just above the foot_px pixels at the tile’s foot.
draw_cursor
Draws cursor in its style on the tile whose left cell is (x, y), clipped to the tiles of layout.