Update Checkbox

This commit is contained in:
Sabine Lim
2023-05-16 02:43:08 +10:00
parent 69318a6b0c
commit eb08f1efcf

View File

@@ -32,22 +32,48 @@ return function(name, basalt)
return self return self
end, end,
setActiveSymbol = function(self, sym)
return self:setSymbol(sym, nil)
end,
setInactiveSymbol = function(self, inactive)
return self:setSymbol(nil, inactive)
end,
getSymbol = function(self) getSymbol = function(self)
return symbol, inactiveSymbol return symbol, inactiveSymbol
end, end,
getActiveSymbol = function(self)
return symbol
end,
getInactiveSymbol = function(self)
return inactiveSymbol
end,
setText = function(self, _text) setText = function(self, _text)
text = _text text = _text
return self return self
end, end,
getText = function(self)
return text
end,
setTextPosition = function(self, pos) setTextPosition = function(self, pos)
textPos = pos or textPos textPos = pos or textPos
return self return self
end, end,
getTextPosition = function(self)
return textPos
end,
setChecked = base.setValue, setChecked = base.setValue,
getChecked = base.getValue,
mouseHandler = function(self, button, x, y) mouseHandler = function(self, button, x, y)
if (base.mouseHandler(self, button, x, y)) then if (base.mouseHandler(self, button, x, y)) then
if(button == 1)then if(button == 1)then