BOOL TWin::CreateU8(LPCSTR className, LPCSTR title, DWORD style, DWORD exStyle, HMENU hMenu) { Wstr className_w(className, BY_UTF8); Wstr title_w(title, BY_UTF8); return CreateW(className_w.s(), title_w.s(), style, exStyle, hMenu); }
static int luaGetClass(lua_State *L) { const char* className = lua_tostring(L, 1); FString className_w(className); UClass* uclass = FindObject<UClass>(ANY_PACKAGE, *className_w); if (uclass == NULL) { lua_pushliteral(L, "Class not found"); lua_error(L); return 0; } else { struct UnrealClass* uc = (struct UnrealClass*) lua_newuserdata(L, sizeof(struct UnrealClass)); luaL_setmetatable(L, "UnrealClass"); uc->uclass = uclass; uc->classname = strdup(className); return 1; } }