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; variable: var RichLabelObj): RichLabelPtr {...}{.raises: [], tags: [].}
-
Creates a new RichLabel pointer.
Arguments:
- name is a node name.
- variable is a RichLabelObj variable.
Examples:
var textobj: RichLabelObj text = RichLabel("RichLabel", textobj)
proc RichLabel(obj: var RichLabelObj): RichLabelPtr {...}{.inline, raises: [], tags: [].}
-
Creates a new RichLabel pointer with default node name "RichLabel".
Arguments:
- variable is a RichLabelObj variable.
Examples:
var textobj: RichLabelObj text = RichLabel(textobj)
Methods
method draw(self: RichLabelPtr; w, h: GLfloat) {...}{.raises: [GLerror, Exception], tags: [RootEffect].}
- This uses in the window.nim.
method duplicate(self: RichLabelPtr; obj: var RichLabelObj): 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.