| 1303 | return 0; |
| 1304 | } |
| 1305 | static int RenderText(lua_State* L)LNOEXCEPT |
| 1306 | { |
| 1307 | ResFont::FontAlignHorizontal halign = ResFont::FontAlignHorizontal::Center; |
| 1308 | ResFont::FontAlignVertical valign = ResFont::FontAlignVertical::Middle; |
| 1309 | if (lua_gettop(L) == 6) |
| 1310 | TranslateAlignMode(L, 6, halign, valign); |
| 1311 | if (!LAPP.RenderText( |
| 1312 | luaL_checkstring(L, 1), |
| 1313 | luaL_checkstring(L, 2), |
| 1314 | (float)luaL_checknumber(L, 3), |
| 1315 | (float)luaL_checknumber(L, 4), |
| 1316 | (float)(luaL_optnumber(L, 5, 1.0) * LRES.GetGlobalImageScaleFactor()), |
| 1317 | halign, |
| 1318 | valign |
| 1319 | )) |
| 1320 | { |
| 1321 | return luaL_error(L, "can't draw text '%m'.", luaL_checkstring(L, 1)); |
| 1322 | } |
| 1323 | return 0; |
| 1324 | } |
| 1325 | static int RenderTexture(lua_State* L)LNOEXCEPT |
| 1326 | { |
| 1327 | const char* tex_name = luaL_checkstring(L, 1); |
nothing calls this directly
no test coverage detected