five-on-it / apps/client/src/gui/labels / WorldLabel
Class: WorldLabel
Defined in: apps/client/src/gui/labels.ts:72
A label over a point of the world.
Constructors
Constructor
new WorldLabel(
host,name,lift):WorldLabel
Defined in: apps/client/src/gui/labels.ts:85
Parameters
host
name
string
lift
number
how far above its point the label's bottom edge stands (px)
Returns
WorldLabel
Methods
debug()
debug():
LabelDebug|null
Defined in: apps/client/src/gui/labels.ts:123
What the tests read; null while it shows nothing.
Returns
LabelDebug | null
named()
named():
NamedRect[]
Defined in: apps/client/src/gui/labels.ts:135
Its named block where it is on the page.
Returns
place()
place(
projector,frame):void
Defined in: apps/client/src/gui/labels.ts:109
Puts it over its point as this frame draws it.
Parameters
projector
frame
number
Returns
void
refresh()
refresh():
void
Defined in: apps/client/src/gui/labels.ts:104
The window or the language changed: lays it out again.
Returns
void
set()
set(
block,text,anchor):void
Defined in: apps/client/src/gui/labels.ts:95
Shows what it says over the point anchor gives every frame, or nothing.
Parameters
block
Block | undefined
text
string
anchor
() => WorldPoint | undefined
Returns
void