From eb08f1efcf8e96f155dab801013b25e3ae39b328 Mon Sep 17 00:00:00 2001 From: Sabine Lim Date: Tue, 16 May 2023 02:43:08 +1000 Subject: [PATCH] Update Checkbox --- Basalt/objects/Checkbox.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Basalt/objects/Checkbox.lua b/Basalt/objects/Checkbox.lua index 0dfc3d5..298f82c 100644 --- a/Basalt/objects/Checkbox.lua +++ b/Basalt/objects/Checkbox.lua @@ -32,22 +32,48 @@ return function(name, basalt) return self end, + setActiveSymbol = function(self, sym) + return self:setSymbol(sym, nil) + end, + + setInactiveSymbol = function(self, inactive) + return self:setSymbol(nil, inactive) + end, + getSymbol = function(self) return symbol, inactiveSymbol end, + getActiveSymbol = function(self) + return symbol + end, + + getInactiveSymbol = function(self) + return inactiveSymbol + end, + setText = function(self, _text) text = _text return self end, + getText = function(self) + return text + end, + setTextPosition = function(self, pos) textPos = pos or textPos return self end, + getTextPosition = function(self) + return textPos + end, + setChecked = base.setValue, + getChecked = base.getValue, + mouseHandler = function(self, button, x, y) if (base.mouseHandler(self, button, x, y)) then if(button == 1)then