From 7d9173b880707c6750be95e665b7d167d89861a6 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Tue, 27 Jan 2026 08:26:08 -0600 Subject: [PATCH] feat(ui): implement CSimpleTexture_IsShown --- 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 473204f..2dbe992 100644 --- a/src/ui/simple/CSimpleTextureScript.cpp +++ b/src/ui/simple/CSimpleTextureScript.cpp @@ -110,7 +110,16 @@ int32_t CSimpleTexture_IsVisible(lua_State* L) { } int32_t CSimpleTexture_IsShown(lua_State* L) { - WHOA_UNIMPLEMENTED(0); + auto type = CSimpleTexture::GetObjectType(); + auto texture = static_cast(FrameScript_GetObjectThis(L, type)); + + if (texture->IsShown()) { + lua_pushnumber(L, 1.0); + } else { + lua_pushnil(L); + } + + return 1; } int32_t CSimpleTexture_GetTexture(lua_State* L) {