|
|
@ -90,14 +90,15 @@ local methods = { |
|
|
|
|
|
|
|
|
|
|
|
self:SetWidth(settings.width) |
|
|
|
self:SetWidth(settings.width) |
|
|
|
self:SetHeight(settings.height) |
|
|
|
self:SetHeight(settings.height) |
|
|
|
self.check:SetFont(MaterialIconsRegular:GetFont(), settings.height + 1, "") |
|
|
|
self.check:SetFont(MaterialSymbolsRounded:GetFont(), settings.height + 1, "") |
|
|
|
end, |
|
|
|
end, |
|
|
|
|
|
|
|
|
|
|
|
---@param self Diesal.GUI.Object.IconToggle |
|
|
|
---@param self Diesal.GUI.Object.IconToggle |
|
|
|
---@param value boolean |
|
|
|
---@param value boolean |
|
|
|
SetChecked = function(self, value) |
|
|
|
SetChecked = function(self, value) |
|
|
|
self.settings.checked = value |
|
|
|
self.settings.checked = value |
|
|
|
self.check:SetText(value and DiesalStyle.MaterialIcon("check_box") or DiesalStyle.MaterialIcon("check_box_outline_blank")) |
|
|
|
self.check:SetText(value and DiesalStyle.MaterialIcon("check_box") or |
|
|
|
|
|
|
|
DiesalStyle.MaterialIcon("check_box_outline_blank")) |
|
|
|
self.frame:SetChecked(value) |
|
|
|
self.frame:SetChecked(value) |
|
|
|
|
|
|
|
|
|
|
|
self[self.settings.disabled and "Disable" or "Enable"](self) |
|
|
|
self[self.settings.disabled and "Disable" or "Enable"](self) |
|
|
@ -187,7 +188,7 @@ local function Constructor() |
|
|
|
local check = self:CreateRegion("FontString", "check", frame) |
|
|
|
local check = self:CreateRegion("FontString", "check", frame) |
|
|
|
check:SetAllPoints(frame, true) |
|
|
|
check:SetAllPoints(frame, true) |
|
|
|
--check:SetAllPoints(frame, true) |
|
|
|
--check:SetAllPoints(frame, true) |
|
|
|
check:SetFont(MaterialIconsRegular:GetFont(), self.defaults.height, "") |
|
|
|
check:SetFont(MaterialSymbolsRounded:GetFont(), self.defaults.height, "") |
|
|
|
-- Setting self.check again is pointless when CreateRegion already does it.... |
|
|
|
-- Setting self.check again is pointless when CreateRegion already does it.... |
|
|
|
-- self.check = check |
|
|
|
-- self.check = check |
|
|
|
|
|
|
|
|