mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-05 23:52:16 +03:00
feat(ui): implement CSimpleFontString_GetText
This commit is contained in:
parent
0962e5952e
commit
b076c2c573
@ -162,7 +162,17 @@ int32_t CSimpleFontString_SetFont(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t CSimpleFontString_GetText(lua_State* L) {
|
int32_t CSimpleFontString_GetText(lua_State* L) {
|
||||||
WHOA_UNIMPLEMENTED(0);
|
auto type = CSimpleFontString::GetObjectType();
|
||||||
|
auto string = static_cast<CSimpleFontString*>(FrameScript_GetObjectThis(L, type));
|
||||||
|
|
||||||
|
auto text = string->GetText();
|
||||||
|
if (!text || !*text) {
|
||||||
|
text = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
lua_pushstring(L, text);
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CSimpleFontString_GetFieldSize(lua_State* L) {
|
int32_t CSimpleFontString_GetFieldSize(lua_State* L) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user