Added per-character color support to love.graphics.print/printf and Text objects. Resolves issue #865.

The aforementioned functions now optionally accept an array instead of a plain string. The array is in the format of: {{r, g, b [, a]}, "first colored text, ", {r, g, b [, a]}, "second colored text", ...}, where the color values specify the color to use in the next section of the text.
This commit is contained in:
Alex Szpakowski
2015-11-01 23:17:46 -04:00
parent 799e303673
commit 389b91cf6f
9 changed files with 399 additions and 195 deletions
+1
View File
@@ -32,6 +32,7 @@ namespace opengl
{
Text *luax_checktext(lua_State *L, int idx);
void luax_checkcoloredstring(lua_State *L, int idx, std::vector<Font::ColoredString> &strings);
int w_Text_set(lua_State *L);
int w_Text_setf(lua_State *L);
int w_Text_add(lua_State *L);