tibia-client/modules/core_widgets/uicheckbox.lua

16 lines
383 B
Lua
Raw Normal View History

2012-01-05 02:28:29 +01:00
UICheckBox = extends(UIWidget)
function UICheckBox.create()
local checkbox = UICheckBox.internalCreate()
checkbox:setFocusable(false)
checkbox:setTextAlign(AlignLeft)
2012-01-05 02:28:29 +01:00
return checkbox
end
function UICheckBox:onMouseRelease(mousePos, mouseButton)
if self:isPressed() and self:containsPoint(mousePos) then
self:setChecked(not self:isChecked())
2012-02-07 05:55:20 +01:00
return true
end
end