from retail
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user