Playground GitHub npm

Compass Strip

Horizontal heading indicator — N/E/S/W marks scroll under a center pointer.

ui hud

Preview

Installation

npx slintcn@latest add compass-strip

Usage

import { CompassStrip } from "slintcn/components/compass-strip.slint";

CompassStrip {
    heading-deg <=> player-heading;   // 0=N, 90=E, 180=S, 270=W
    strip-width: 240px;
}

Properties

heading-deg in float

Current heading in degrees, 0..360 (0 = N, 90 = E, 180 = S, 270 = W).

strip-width in length

Pixel width of the visible strip; the marks scroll inside it.

strip-height in length

Pixel height of the strip.

tint in color

Color of the marks + cardinal labels.

surface in color

Surface color behind the marks.

API

Accessibility
focusableno

Dependencies

theme only

Installed automatically as transitive dependencies of slintcn add compass-strip.