Skip to content

Commit

Permalink
Color Picker for 10.2.5; Tagging version as Release
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Jan 15, 2024
1 parent 017f38a commit 4df6df3
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Libs/DF/fw.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


local dversion = 502
local dversion = 503
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary(major, minor)

Expand Down
106 changes: 80 additions & 26 deletions Libs/DF/panel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
19 changes: 17 additions & 2 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.",
Expand Down

0 comments on commit 4df6df3

Please sign in to comment.