setTextv

Syntax

void setTextv(int x, int y, int color, int flags, char* text, ...)

Arguments

x
Horizontal offset from left edge in pixels.
y
Vertical offset from top edge in pixels.
color
Color value for the text.
flags
Any combination of TA_* and VTA_* flags. Available alignment constants are TA_BASELINE, TA_BOTTOM, TA_TOP, TA_CENTER, TA_LEFT, TA_RIGHT, TA_NOUPDATECP, TA_RTLREADING, TA_UPDATECP, VTA_BASELINE, VTA_CENTER
text
The formatted text to render.
...
Additional variables to substitute for the formatting symbols in text

Description

Renders formatted text to an ownerdraw control.

Example

%fml
ctl[0]: OWNERDRAW, color=RGBA(0,0,0, 255), Size=(100,100)
ctl[7]: STANDARD, Text="Value", Pos=(*, 120)

ForEveryTile: {
  startSetPixel(0);
  setFill(RGB(0,0,88));
  setTextv(60, 25, RGB(0,0,0), VTA_CENTER | TA_BASELINE, "Value is: %d", ctl(7));
  endSetPixel(0);
  return true;
}

See Also

setFont, setText