diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index 9181b47b9..6e799dcec 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -1,6 +1,6 @@ -local dversion = 502 +local dversion = 503 local major, minor = "DetailsFramework-1.0", dversion local DF, oldminor = LibStub:NewLibrary(major, minor) diff --git a/Libs/DF/panel.lua b/Libs/DF/panel.lua index 7461a9148..aac8427cd 100644 --- a/Libs/DF/panel.lua +++ b/Libs/DF/panel.lua @@ -1483,41 +1483,95 @@ end ------------color pick -local color_pick_func = function() - local r, g, b = ColorPickerFrame:GetColorRGB() - local a = OpacitySliderFrame:GetValue() - ColorPickerFrame:dcallback (r, g, b, a, ColorPickerFrame.dframe) -end -local color_pick_func_cancel = function() - ColorPickerFrame:SetColorRGB (unpack(ColorPickerFrame.previousValues)) - local r, g, b = ColorPickerFrame:GetColorRGB() - local a = OpacitySliderFrame:GetValue() - ColorPickerFrame:dcallback (r, g, b, a, ColorPickerFrame.dframe) -end +local _, _, _, toc = GetBuildInfo() +if (toc >= 100205) then + local color_pick_func = function(...) + local r, g, b = ColorPickerFrame:GetColorRGB() + local a = ColorPickerFrame:GetColorAlpha() + ColorPickerFrame:dcallback (r, g, b, a, ColorPickerFrame.dframe) + end + + local color_pick_func_cancel = function() + local r, g, b, a = ColorPickerFrame.previousValues.r, ColorPickerFrame.previousValues.g, ColorPickerFrame.previousValues.b, ColorPickerFrame.previousValues.a + ColorPickerFrame.Content.ColorPicker:SetColorRGB(r, g, b) + ColorPickerFrame:dcallback (r, g, b, a, ColorPickerFrame.dframe) + end + + function detailsFramework:ColorPick(frame, r, g, b, alpha, callback) + + ColorPickerFrame:ClearAllPoints() + ColorPickerFrame:SetPoint("bottomleft", frame, "topright", 0, 0) + + ColorPickerFrame.dcallback = callback + ColorPickerFrame.dframe = frame + + ColorPickerFrame.func = color_pick_func + ColorPickerFrame.opacityFunc = color_pick_func + ColorPickerFrame.cancelFunc = color_pick_func_cancel + + ColorPickerFrame.opacity = alpha + ColorPickerFrame.hasOpacity = alpha and true + + ColorPickerFrame.previousValues = {r, g, b} + ColorPickerFrame.previousAlpha = alpha + ColorPickerFrame:SetParent(UIParent) + ColorPickerFrame:SetFrameStrata("tooltip") + + local info = { + swatchFunc = color_pick_func, + hasOpacity = alpha and true, + opacityFunc = color_pick_func, + opacity = alpha, + previousValues = {r = r, g = g, b = b, a = alpha}, + cancelFunc = color_pick_func_cancel, + r = r, + g = g, + b = b, + } + --OpenColorPicker(info) + ColorPickerFrame:SetupColorPickerAndShow(info) -function detailsFramework:ColorPick (frame, r, g, b, alpha, callback) + end +else + local color_pick_func = function() + local r, g, b = ColorPickerFrame:GetColorRGB() + local a = OpacitySliderFrame:GetValue() + ColorPickerFrame:dcallback (r, g, b, a, ColorPickerFrame.dframe) + end + local color_pick_func_cancel = function() + ColorPickerFrame:SetColorRGB (unpack(ColorPickerFrame.previousValues)) + local r, g, b = ColorPickerFrame:GetColorRGB() + local a = OpacitySliderFrame:GetValue() + ColorPickerFrame:dcallback (r, g, b, a, ColorPickerFrame.dframe) + end - ColorPickerFrame:ClearAllPoints() - ColorPickerFrame:SetPoint("bottomleft", frame, "topright", 0, 0) + function detailsFramework:ColorPick (frame, r, g, b, alpha, callback) - ColorPickerFrame.dcallback = callback - ColorPickerFrame.dframe = frame + ColorPickerFrame:ClearAllPoints() + ColorPickerFrame:SetPoint("bottomleft", frame, "topright", 0, 0) - ColorPickerFrame.func = color_pick_func - ColorPickerFrame.opacityFunc = color_pick_func - ColorPickerFrame.cancelFunc = color_pick_func_cancel + ColorPickerFrame.dcallback = callback + ColorPickerFrame.dframe = frame - ColorPickerFrame.opacity = alpha - ColorPickerFrame.hasOpacity = alpha and true + ColorPickerFrame.func = color_pick_func + ColorPickerFrame.opacityFunc = color_pick_func + ColorPickerFrame.cancelFunc = color_pick_func_cancel - ColorPickerFrame.previousValues = {r, g, b} - ColorPickerFrame:SetParent(UIParent) - ColorPickerFrame:SetFrameStrata("tooltip") - ColorPickerFrame:SetColorRGB (r, g, b) - ColorPickerFrame:Show() + ColorPickerFrame.opacity = alpha + ColorPickerFrame.hasOpacity = alpha and true + ColorPickerFrame.previousValues = {r, g, b} + ColorPickerFrame:SetParent(UIParent) + ColorPickerFrame:SetFrameStrata("tooltip") + ColorPickerFrame:SetColorRGB (r, g, b) + ColorPickerFrame:Show() + end end + + + + ------------icon pick function detailsFramework:IconPick (callback, close_when_select, param1, param2) diff --git a/boot.lua b/boot.lua index 96b5a8da9..e52b30024 100644 --- a/boot.lua +++ b/boot.lua @@ -18,8 +18,8 @@ local addonName, Details222 = ... local version, build, date, tocversion = GetBuildInfo() - Details.build_counter = 12197 - Details.alpha_build_counter = 12197 --if this is higher than the regular counter, use it instead + Details.build_counter = 12220 + Details.alpha_build_counter = 12220 --if this is higher than the regular counter, use it instead Details.dont_open_news = true Details.game_version = version Details.userversion = version .. " " .. Details.build_counter @@ -157,6 +157,21 @@ do --]=] local news = { + {"v10.2.0.12220.155", "January 14th, 2024"}, + "Ignoring the heal of Smoldering Seedling trinket (Flamanis).", + "Attribute Judgement of Light to the healed on Wrath (Flamanis).", + "Fixed an error while scrolling down target npcs in the breakdown window.", + "Fixed an error when clicking to open the Death Recap by Details!.", + "End of Mythic Run panel got updates.", + "Many tooltips in Details! are now rouded!", + "Evoker extra bar tooltip's, now also show the uptime of Black Attunement and Prescience applications.", + "Breakdown Window now show Plater Npc Colors in the target box.", + "Added event: 'COMBAT_MYTHICPLUS_OVERALL_READY', trigger when the overall segment for the mythic+ is ready.", + "Added event: 'COMBAT_PLAYER_LEAVING', trigger at the beginning of the leave combat process.", + "Added: Details:IsInMythicPlus() return true if the player is on a mythic dungeon run.", + "CombatObjects now have the key 'is_challenge' if the combat is a part of a challenge mode or mythic+ run.", + "Lib Open Raid updated.", + {"v10.2.0.12188.155", "December 28th, 2023"}, "Dreamwalker's Healing Potion now shows in the Healing Potion & Stone custom display.", "Added the 'Remove Battleground Segments' option to the menu that opens when hovering over the erase button.",