mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(ui): implement CSimpleButton_IsEnabled
This commit is contained in:
parent
ce629fc5c8
commit
005f33781f
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user