Skip to content

1681-engine / ui / RichTextOptions

Interface: RichTextOptions ​

Defined in: src/ui/rich/RichText.ts:8

Extends ​

Properties ​

align? ​

ts
optional align?: RichAlign;

Defined in: src/ui/rich/richLayout.ts:28

Inherited from ​

RichLayoutOptions.align


colors? ​

ts
optional colors?: Readonly<Record<string, string>>;

Defined in: src/ui/rich/richMarkup.ts:45

Colour names the markup may use besides hex ([color=gold]).

Inherited from ​

RichMarkupOptions.colors


font ​

ts
font: RichFont;

Defined in: src/ui/rich/RichText.ts:10

What the runs are drawn with: CanvasRichFont, BitmapRichFont, or a game's own.


iconScale? ​

ts
optional iconScale?: number | "line";

Defined in: src/ui/rich/richLayout.ts:35

'line' (default): an icon is as tall as its style's line — on a pixel-perfect layout the largest whole multiple of its frame that fits, never below 1×, so its texels stay square. A number: that scale, whatever the line.

Inherited from ​

RichLayoutOptions.iconScale


lineSpacing? ​

ts
optional lineSpacing?: number;

Defined in: src/ui/rich/richLayout.ts:30

Extra pixels between lines.

Inherited from ​

RichLayoutOptions.lineSpacing


pixelPerfect? ​

ts
optional pixelPerfect?: boolean;

Defined in: src/ui/rich/richLayout.ts:37

Whole-pixel positions and icon scales (a pixel-art game).

Inherited from ​

RichLayoutOptions.pixelPerfect


textures? ​

ts
optional textures?: TextureRegistry;

Defined in: src/ui/rich/RichText.ts:12

Where [icon=…] keys are looked up; without it icons take no room and draw nothing.


wrapWidth? ​

ts
optional wrapWidth?: number;

Defined in: src/ui/rich/richLayout.ts:27

Wrap lines to this width; unset, lines break only at \n.

Inherited from ​

RichLayoutOptions.wrapWidth

Released under the MIT License.