MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / LoadTTF

Method LoadTTF

LuaSTGPlus/LuaWrapper.cpp:974–986  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

972 return 0;
973 }
974 static int LoadTTF(lua_State* L)LNOEXCEPT
975 {
976 const char* name = luaL_checkstring(L, 1);
977 const char* path = luaL_checkstring(L, 2);
978
979 ResourcePool* pActivedPool = LRES.GetActivedPool();
980 if (!pActivedPool)
981 return luaL_error(L, "can't load resource at this time.");
982
983 if (!pActivedPool->LoadTTFFont(name, path, (float)luaL_checknumber(L, 3), (float)luaL_checknumber(L, 4)))
984 return luaL_error(L, "load ttf font failed (name=%s, path=%s)", name, path);
985 return 0;
986 }
987 static int LoadFX(lua_State* L)LNOEXCEPT
988 {
989 const char* name = luaL_checkstring(L, 1);

Callers

nothing calls this directly

Calls 2

GetActivedPoolMethod · 0.80
LoadTTFFontMethod · 0.80

Tested by

no test coverage detected