Skip to content

Commit

Permalink
Update LuaMain.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
NPO-197 committed Oct 18, 2024
1 parent ba82d93 commit 92fc1f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/frontend/qt_sdl/LuaMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,19 +487,19 @@ int Lua_Flip(lua_State* L)
}
AddLuaFunction(Lua_Flip,Flip);

//Text(int x, int y, string message, [u32 color = 'black'], [int fontsize = 9], [string fontfamily = Franklin Gothic Medium])
//Text(int x, int y, string message, [u32 color = 'black'], [int fontsize = 9], [string fontfamily = Helvetica])
int Lua_text(lua_State* L)
{
LuaBundle* bundle = get_bundle(L);
int x = luaL_checknumber(L,1);
int y = luaL_checknumber(L,2);
const char* message = luaL_checklstring(L,3,NULL);
melonDS::u32 color = luaL_optnumber(L,4,0x00000000);
QString FontFamily = luaL_optlstring(L,6,"Monospace",NULL);
QString FontFamily = luaL_optlstring(L,6,"Helvetica",NULL);
int size = luaL_optnumber(L,5,9);
QPainter painter(bundle->luaCanvas->imageBuffer);
QFont font(FontFamily,size,0,false);
//font.setStyleStrategy(QFont::NoAntialias);
font.setStyleStrategy(QFont::NoAntialias);
//font.setLetterSpacing(QFont::AbsoluteSpacing,-1);
painter.setFont(font);
painter.setPen(color);
Expand Down

0 comments on commit 92fc1f9

Please sign in to comment.