from retail

This commit is contained in:
NoM0Re
2025-01-22 18:23:23 +01:00
parent 23c7da5ea6
commit 674ea9fe1e
10 changed files with 137 additions and 38 deletions
+36
View File
@@ -84,6 +84,17 @@ local properties = {
type = "bool",
default = true,
},
tick_use_texture = {
display = L["Use Texture"],
setter = "SetUseTexture",
type = "bool",
default = true,
},
tick_texture = {
display = L["Texture"],
setter = "SetTexture",
type = "texture"
}
}
local function GetProperties(parentData, data)
@@ -408,6 +419,31 @@ local funcs = {
end
end
end,
UpdateTexture = function(self)
if self.use_texture then
for _, tick in ipairs(self.ticks) do
tick:SetTexture(tick, self.tick_texture)
end
else
for _, tick in ipairs(self.ticks) do
tick:SetTexture(self.tick_color[1], self.tick_color[2], self.tick_color[3], self.tick_color[4])
end
end
end,
SetTexture = function(self, texture)
if self.tick_texture == texture then
return
end
self.tick_texture = texture
self:UpdateTexture()
end,
SetUseTexture = function(self, use)
if self.use_texture == use then
return
end
self.use_texture = use
self:UpdateTexture()
end
}
local function modify(parent, region, parentData, data, first)