Font can now be omitted from setFont/newFont to use the default font.

This commit is contained in:
rude
2009-11-30 22:55:30 +01:00
parent af01b840a1
commit 05439961d2
4 changed files with 73 additions and 33 deletions
@@ -195,7 +195,7 @@ namespace opengl
return 1;
}
int w_newFont(lua_State * L)
int w_newFont1(lua_State * L)
{
Data * d = 0;
@@ -320,7 +320,7 @@ namespace opengl
return 4;
}
int w_setFont(lua_State * L)
int w_setFont1(lua_State * L)
{
// The second parameter is an optional int.
int size = luaL_optint(L, 2, 12);
@@ -787,7 +787,7 @@ namespace opengl
{ "newImage", w_newImage },
{ "newGlyph", w_newGlyph },
{ "newQuad", w_newQuad },
{ "newFont", w_newFont },
{ "newFont1", w_newFont1 },
{ "newImageFont", w_newImageFont },
{ "newSpriteBatch", w_newSpriteBatch },
{ "newParticleSystem", w_newParticleSystem },
@@ -797,7 +797,7 @@ namespace opengl
{ "setBackgroundColor", w_setBackgroundColor },
{ "getBackgroundColor", w_getBackgroundColor },
{ "setFont", w_setFont },
{ "setFont1", w_setFont1 },
{ "getFont", w_getFont },
{ "setBlendMode", w_setBlendMode },
+2 -2
View File
@@ -52,7 +52,7 @@ namespace opengl
int w_newImage(lua_State * L);
int w_newGlyph(lua_State * L);
int w_newFrame(lua_State * L);
int w_newFont(lua_State * L);
int w_newFont1(lua_State * L);
int w_newImageFont(lua_State * L);
int w_newSpriteBatch(lua_State * L);
int w_newParticleSystem(lua_State * L);
@@ -60,7 +60,7 @@ namespace opengl
int w_getColor(lua_State * L);
int w_setBackgroundColor(lua_State * L);
int w_getBackgroundColor(lua_State * L);
int w_setFont(lua_State * L);
int w_setFont1(lua_State * L);
int w_getFont(lua_State * L);
int w_setBlendMode(lua_State * L);
int w_setColorMode(lua_State * L);