DrawText (Harvest)
From OxeyeWiki
(Difference between revisions)
Jeb (Talk | contribs)
(Created page with '{{HarvestMethod | harvest.drawText(string, x, y[, alignment[, r, g, b[, a]]]) | Adds a text line to the render queue. These texts are drawn after the game, but before all other G...')
Newer edit →
(Created page with '{{HarvestMethod | harvest.drawText(string, x, y[, alignment[, r, g, b[, a]]]) | Adds a text line to the render queue. These texts are drawn after the game, but before all other G...')
Newer edit →
Revision as of 12:10, 13 March 2009
harvest.drawText(string, x, y[, alignment[, r, g, b[, a]]]) | ||
Adds a text line to the render queue. These texts are drawn after the game, but before all other GUI. The 'alignment' parameter can either be 0 for left-, 1 for center- or 2 for right-aligned. RGBA parameters are given in the range from 0 to 255, and defaults to full opaque white color. | ||
Parameter | Expected Type | Description |
string | A string | The text to draw. |
x | An integer | The x coordinate. |
y | An integer | The y coordinate. |
alignment | An integer | The alignment of the text, 0 is left-, 1 is center- and 2 is right-aligned. |
a | An integer | The text color's alpha component, 0 is min and 255 is max. |
r | An integer | The text color's red component, 0 is min and 255 is max. |
g | An integer | The text color's green component, 0 is min and 255 is max. |
b | An integer | The text color's blue component, 0 is min and 255 is max. |
Returns | ||
Returns nothing. |
Example
harvest.drawText("Timer is now: " .. timer, 100, 100, 0, 255, 255, 0, 255)