mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 11:12:29 +00:00
feat(ui): implement SetFocus and ClearFocus script methods (CSimpleEditBox)
This commit is contained in:
parent
03ba4ccbb1
commit
465b3844de
3 changed files with 18 additions and 2 deletions
|
|
@ -176,11 +176,19 @@ int32_t CSimpleEditBox_GetTextInsets(lua_State* L) {
|
|||
}
|
||||
|
||||
int32_t CSimpleEditBox_SetFocus(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
int32_t type = CSimpleEditBox::GetObjectType();
|
||||
auto object = static_cast<CSimpleEditBox*>(FrameScript_GetObjectThis(L, type));
|
||||
|
||||
CSimpleEditBox::SetKeyboardFocus(object);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t CSimpleEditBox_ClearFocus(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
int32_t type = CSimpleEditBox::GetObjectType();
|
||||
auto object = static_cast<CSimpleEditBox*>(FrameScript_GetObjectThis(L, type));
|
||||
|
||||
CSimpleEditBox::ClearKeyboardFocus(object, true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t CSimpleEditBox_HasFocus(lua_State* L) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue