From 98ea3099855e87e5a1424ef4d2cfc1aae8c8cae5 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Tue, 27 Jan 2026 08:24:29 -0600 Subject: [PATCH] feat(ui): implement CSimpleTexture_IsVisible --- src/ui/simple/CSimpleTextureScript.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ui/simple/CSimpleTextureScript.cpp b/src/ui/simple/CSimpleTextureScript.cpp index a6ea6ac..473204f 100644 --- a/src/ui/simple/CSimpleTextureScript.cpp +++ b/src/ui/simple/CSimpleTextureScript.cpp @@ -97,7 +97,16 @@ int32_t CSimpleTexture_Hide(lua_State* L) { } int32_t CSimpleTexture_IsVisible(lua_State* L) { - WHOA_UNIMPLEMENTED(0); + auto type = CSimpleTexture::GetObjectType(); + auto texture = static_cast(FrameScript_GetObjectThis(L, type)); + + if (texture->IsVisible()) { + lua_pushnumber(L, 1.0); + } else { + lua_pushnil(L); + } + + return 1; } int32_t CSimpleTexture_IsShown(lua_State* L) {