mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(ui): implement CSimpleFontString_GetFontObject
This commit is contained in:
parent
6cfe08d7e2
commit
f32975f340
@ -73,7 +73,24 @@ int32_t CSimpleFontString_IsShown(lua_State* L) {
|
||||
}
|
||||
|
||||
int32_t CSimpleFontString_GetFontObject(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
auto type = CSimpleFontString::GetObjectType();
|
||||
auto string = static_cast<CSimpleFontString*>(FrameScript_GetObjectThis(L, type));
|
||||
|
||||
auto font = string->GetFontObject();
|
||||
|
||||
if (!font) {
|
||||
lua_pushnil(L);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!font->lua_registered) {
|
||||
font->RegisterScriptObject(nullptr);
|
||||
}
|
||||
|
||||
lua_rawgeti(L, LUA_REGISTRYINDEX, font->lua_objectRef);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t CSimpleFontString_SetFontObject(lua_State* L) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user