It provides convenient text rendering. With it, you can set color and underlie for specific chars.
Types
RichLabelObj = object of ControlPtr font*: pointer ## Glut font data. spacing*: float ## Font spacing. size*: float ## Font size. text*: ColorTextRef ## RichLabel text. text_align*: AnchorRef ## Text align.
RichLabelPtr = ptr RichLabelObj
Procs
proc RichLabel(name: string = "RichLabel"): RichLabelPtr {...}{.raises: [], tags: [].}
-
Creates a new RichLabel pointer.
Arguments:
- name is a node name.
Examples:
var text = RichLabel("RichLabel")
Methods
method draw(self: RichLabelPtr; w, h: GLfloat) {...}{.raises: [GLerror, Exception], tags: [RootEffect].}
- This uses in the window.nim.
method duplicate(self: RichLabelPtr): RichLabelPtr {...}{.base, raises: [], tags: [].}
- Duplicates Richlabel object and create a new RichLabel pointer.
method setTextAlign(self: RichLabelPtr; align: AnchorRef) {...}{.base, raises: [], tags: [].}
- Changes text alignment.
method setTextAlign(self: RichLabelPtr; x1, y1, x2, y2: float) {...}{.base, raises: [], tags: [].}
- Changes text alignment.
method setText(self: RichLabelPtr; value: ColorTextRef) {...}{.base, raises: [], tags: [].}
- Changes RichLabel text.