Text under an MWG-owned name, for the case ui.Label/ui.BitmapLabel do not cover - a one-off caption inside a Shape2D-drawn diagram, say, rather than themed game-wide UI text. Prefer Label/BitmapLabel for anything styled through ui.theme().
ui.Label
ui.BitmapLabel
Shape2D
Label
BitmapLabel
ui.theme()
import { Text2D } from '@datamoc/mw_games/two-d/render';const caption = new Text2D({ text: 'N', style: { fill: 0xffffff, fontSize: 14 } });caption.x = 40;caption.y = 4; Copy
import { Text2D } from '@datamoc/mw_games/two-d/render';const caption = new Text2D({ text: 'N', style: { fill: 0xffffff, fontSize: 14 } });caption.x = 40;caption.y = 4;
Optional
The options of the text.
since 8.0.0
Text under an MWG-owned name, for the case
ui.Label/ui.BitmapLabeldo not cover - a one-off caption inside aShape2D-drawn diagram, say, rather than themed game-wide UI text. PreferLabel/BitmapLabelfor anything styled throughui.theme().Example