http://www.oxeyegames.com/wiki/index.php?title=RenderText&feed=atom&action=historyRenderText - Revision history2024-03-29T08:38:26ZRevision history for this page on the wikiMediaWiki 1.16.0http://www.oxeyegames.com/wiki/index.php?title=RenderText&diff=128&oldid=prevJeb: Created page with '{{VideoMethod | video.renderText(text, x, y[, alignment[, font[, a, r, g, b]]]) | Renders a text string on the screen using an optional font. | {{MethodParam|text|A string|The te...'2009-03-10T13:26:52Z<p>Created page with '{{VideoMethod | video.renderText(text, x, y[, alignment[, font[, a, r, g, b]]]) | Renders a text string on the screen using an optional font. | {{MethodParam|text|A string|The te...'</p>
<p><b>New page</b></p><div>{{VideoMethod<br />
|<br />
video.renderText(text, x, y[, alignment[, font[, a, r, g, b]]])<br />
|<br />
Renders a text string on the screen using an optional font.<br />
|<br />
{{MethodParam|text|A string|The text to render.}}<br />
{{MethodParam|x|An integer|The screen x coordinate.}}<br />
{{MethodParam|y|An integer|The screen y coordinate.}}<br />
{{MethodParam|alignment|Optional integer|The alignment of the text, relative to (x, y). Default is 0, which means left alignment (text will be rendered to the right of the x coordinate). Set this value to 1 for centered alignment, or 2 for right alignment. In all cases, the y coordinate is the text's upper position.}}<br />
{{MethodParam|font|Optional string|The path and filename of the font if you want to use another than the default one.}}<br />
{{MethodParam|a|Optional integer|The text color's alpha component.}}<br />
{{MethodParam|r|Optional integer|The text color's red component.}}<br />
{{MethodParam|g|Optional integer|The text color's green component.}}<br />
{{MethodParam|b|Optional integer|The text color's blue component.}}<br />
|<br />
Returns nothing.<br />
}}<br />
=== Example ===<br />
<pre><br />
video.renderText("Left-aligned text", 100, 100)<br />
<br />
video.renderText("Centered text", 100, 120, 1)<br />
<br />
video.renderText("Right-aligned text", 100, 140, 2)<br />
<br />
video.renderText("Red text", 100, 160, 0, "font.fnt", 255, 255, 0, 0)<br />
</pre></div>Jeb