from retail

This commit is contained in:
NoM0Re
2025-02-25 21:47:56 +01:00
parent 2157fbc553
commit c48ce524f8
6 changed files with 68 additions and 23 deletions
+13 -1
View File
@@ -33,6 +33,8 @@ local default = {
borderBackdrop = "Blizzard Tooltip"
};
Private.regionPrototype.AddAlphaToDefault(default)
local screenWidth, screenHeight = math.ceil(GetScreenWidth() / 20) * 20, math.ceil(GetScreenHeight() / 20) * 20;
local properties = {
@@ -63,7 +65,13 @@ local function GetProperties(data)
end
local regionFunctions = {
Update = function() end
Update = function() end,
SetAlpha = function(self, alpha)
self.alpha = alpha
if self.model then
self.model:SetAlpha(alpha)
end
end
}
-- Called when first creating a new region/display
@@ -161,6 +169,7 @@ local function AcquireModel(region, data)
end
local function ReleaseModel(model)
model:SetAlpha(1)
--model:SetKeepModelOnHide(false)
model:Hide()
model:UnregisterEvent("UNIT_MODEL_CHANGED");
@@ -272,6 +281,9 @@ local function modify(parent, region, data)
else
ConfigureModel(region, region.model, data)
end
if type(data.alpha) == "number" then
region:SetAlpha(data.alpha)
end
end
function region:PreHide()