mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-14 18:21:26 +03:00
feat(ui): implement CSimpleButton_IsEnabled
This commit is contained in:
1 parent
0865230059
commit
cea3d87571
1 file changed
+6
-1
@@ -72,7 +72,12 @@ int32_t CSimpleButton_Disable(lua_State* L) {
|
||||
}
|
||||
|
||||
int32_t CSimpleButton_IsEnabled(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
auto type = CSimpleButton::GetObjectType();
|
||||
auto button = static_cast<CSimpleButton*>(FrameScript_GetObjectThis(L, type));
|
||||
|
||||
lua_pushnumber(L, button->GetButtonState() != BUTTONSTATE_DISABLED);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t CSimpleButton_GetButtonState(lua_State* L) {
|
||||
|
||||
Reference in new issue
Block a user