From bc2ab474e75bec124ebb17de9b4a62215f222dc5 Mon Sep 17 00:00:00 2001 From: Flamanis Date: Thu, 31 Aug 2023 15:40:06 -0500 Subject: [PATCH] Remove classic era checks for functions that were added. --- Libs/DF/containers.lua | 9 +++------ Libs/DF/pictureedit.lua | 8 ++------ core/plugins_statusbar.lua | 17 ++++++----------- frames/window_main.lua | 7 +------ plugins/Details_Streamer/Details_Streamer.lua | 7 +------ 5 files changed, 13 insertions(+), 35 deletions(-) diff --git a/Libs/DF/containers.lua b/Libs/DF/containers.lua index fa8b62f8..b26baa0f 100644 --- a/Libs/DF/containers.lua +++ b/Libs/DF/containers.lua @@ -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 diff --git a/Libs/DF/pictureedit.lua b/Libs/DF/pictureedit.lua index 826d4973..da178329 100644 --- a/Libs/DF/pictureedit.lua +++ b/Libs/DF/pictureedit.lua @@ -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 diff --git a/core/plugins_statusbar.lua b/core/plugins_statusbar.lua index 343d18d7..7853ff6c 100644 --- a/core/plugins_statusbar.lua +++ b/core/plugins_statusbar.lua @@ -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%") diff --git a/frames/window_main.lua b/frames/window_main.lua index 62db0f2d..78c76a61 100644 --- a/frames/window_main.lua +++ b/frames/window_main.lua @@ -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) diff --git a/plugins/Details_Streamer/Details_Streamer.lua b/plugins/Details_Streamer/Details_Streamer.lua index 94e75138..ec2710dd 100644 --- a/plugins/Details_Streamer/Details_Streamer.lua +++ b/plugins/Details_Streamer/Details_Streamer.lua @@ -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()