From e87aff4c1179c538471abc534b78f33b370d74aa Mon Sep 17 00:00:00 2001 From: fallenoak Date: Tue, 18 Nov 2025 20:52:41 -0600 Subject: [PATCH] feat(ui): implement CSimpleFrame_IsVisible --- src/ui/CSimpleFrameScript.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ui/CSimpleFrameScript.cpp b/src/ui/CSimpleFrameScript.cpp index c1d0c1e..efb53fa 100644 --- a/src/ui/CSimpleFrameScript.cpp +++ b/src/ui/CSimpleFrameScript.cpp @@ -295,7 +295,16 @@ int32_t CSimpleFrame_Hide(lua_State* L) { } int32_t CSimpleFrame_IsVisible(lua_State* L) { - WHOA_UNIMPLEMENTED(0); + auto type = CSimpleFrame::GetObjectType(); + auto frame = static_cast(FrameScript_GetObjectThis(L, type)); + + if (frame->m_visible) { + lua_pushnumber(L, 1.0); + } else { + lua_pushnil(L); + } + + return 1; } int32_t CSimpleFrame_IsShown(lua_State* L) {