Remove classic era checks for functions that were added.

This commit is contained in:
Flamanis
2023-08-31 15:40:06 -05:00
parent 5cef044c5c
commit bc2ab474e7
5 changed files with 13 additions and 35 deletions
+3 -6
View File
@@ -323,12 +323,9 @@ detailsFramework.FrameContainerMixin = {
frameContainer:CheckResizeLockedState()
frameContainer:CheckMovableLockedState()
if (frameContainer.SetMinResize) then --old versions of the game uses this method
frameContainer:SetMinResize(50, 50)
frameContainer:SetMaxResize(1000,1000)
else
frameContainer:SetResizeBounds(50, 50, 1000, 1000) --new versions has this method
end
frameContainer:SetResizeBounds(50, 50, 1000, 1000) --new versions has this method
end,
---run when the container has its size changed
+2 -6
View File
@@ -15,12 +15,8 @@ local CreateImageEditorFrame = function()
editorWindow:SetClampedToScreen(true)
tinsert(UISpecialFrames, "DetailsFrameworkImageEdit")
editorWindow:SetFrameStrata("TOOLTIP")
if (not DetailsFramework.IsDragonflight()) then
editorWindow:SetMaxResize(500, 500)
else
editorWindow:SetResizeBounds(100, 100, 500, 500)
end
editorWindow:SetResizeBounds(100, 100, 500, 500)
_G.DetailsFrameworkImageEditTable = editorWindow
+6 -11
View File
@@ -1055,18 +1055,13 @@ do
for index, child in ipairs(Threat.childs) do
local instance = child.instance
if (child.enabled and instance:IsEnabled()) then
if (not DetailsFramework.IsClassicWow()) then
local isTanking, status, threatPercent, rawthreatpct, threatvalue = _UnitDetailedThreatSituation("player", "target")
if (threatPercent) then
child.text:SetText(math.floor(threatPercent).."%")
if (Threat.isTank) then
child.text:SetTextColor(math.abs(threatPercent - 100) * 0.01, threatPercent * 0.01, 0, 1)
else
child.text:SetTextColor(threatPercent * 0.01, math.abs(threatPercent - 100) * 0.01, 0, 1)
end
local isTanking, status, threatPercent, rawthreatpct, threatvalue = _UnitDetailedThreatSituation("player", "target")
if (threatPercent) then
child.text:SetText(math.floor(threatPercent).."%")
if (Threat.isTank) then
child.text:SetTextColor(math.abs(threatPercent - 100) * 0.01, threatPercent * 0.01, 0, 1)
else
child.text:SetText("0%")
child.text:SetTextColor(1, 1, 1, 1)
child.text:SetTextColor(threatPercent * 0.01, math.abs(threatPercent - 100) * 0.01, 0, 1)
end
else
child.text:SetText("0%")
+1 -6
View File
@@ -3585,12 +3585,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
baseframe:EnableMouseWheel(false)
baseframe:EnableMouse(true)
if (not DetailsFramework.IsDragonflight() and not DetailsFramework.IsWotLKWowWithRetailAPI()) then
baseframe:SetMinResize (150, 7)
baseframe:SetMaxResize (Details.max_window_size.width, Details.max_window_size.height)
else
--baseframe:SetResizeBounds(150, 7, _detalhes.max_window_size.width, _detalhes.max_window_size.height)
end
baseframe:SetResizeBounds(150, 7, _detalhes.max_window_size.width, _detalhes.max_window_size.height)
baseframe:SetBackdrop(defaultBackdropSt)
baseframe:SetBackdropColor(instancia.bg_r, instancia.bg_g, instancia.bg_b, instancia.bg_alpha)
@@ -210,12 +210,7 @@ local function CreatePluginFrames()
SOF:SetClampedToScreen (true)
pcall(function()
if (DetailsFramework.IsDragonflight()) then
SOF:SetResizeBounds(150, 10, 800, 1024)
else
SOF:SetMinResize(150, 10)
SOF:SetMaxResize(800, 1024)
end
SOF:SetResizeBounds(150, 10, 800, 1024)
end)
function StreamOverlay:SaveWindowSizeAnLocation()