mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 21:13:26 +02:00
major UIWidget rewrite with new features
This commit is contained in:
@@ -3,6 +3,12 @@ UICheckBox = extends(UIWidget)
|
||||
function UICheckBox.create()
|
||||
local checkbox = UICheckBox.internalCreate()
|
||||
checkbox:setFocusable(false)
|
||||
checkbox:setAlign(AlignLeft)
|
||||
checkbox:setTextAlign(AlignLeft)
|
||||
return checkbox
|
||||
end
|
||||
|
||||
function UICheckBox:onMouseRelease(mousePos, mouseButton)
|
||||
if self:isPressed() and self:containsPoint(mousePos) then
|
||||
self:setChecked(not self:isChecked())
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user