major UIWidget rewrite with new features

This commit is contained in:
Eduardo Bart
2012-01-10 20:13:40 -02:00
parent 044213c6cd
commit a1374baee1
83 changed files with 1990 additions and 2010 deletions

View File

@@ -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