Thread Tools Display Modes
01-06-24, 01:28 PM   #1
Sharpedge
A Wyrmkin Dreamwalker
 
Sharpedge's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2022
Posts: 54
Color Picker issues 10.2.5

I'm trying to see if anyone else has had an issue with color picker when using it to change font colors etc. It works perfectly fine in 10.2, but when I went to the PTR its a no go. There are no errors, and when you click on the Font color button in my addon it does nothing. It doesn't even pull up the color picker.

Does anyone know if this is an issue that Blizz knows about? Or do I need to figure out how to get around it? Below is part of my code for the color picker:

Code:
fontColor = {
            type = "color",
            name = "Button Font Color",
            desc = "Set the color of the button text.",
            hasAlpha = true,
            get = function()
                local color = IncDB.fontColor or {r = 1, g = 1, b = 1, a = 1} -- Default to white
                return color.r, color.g, color.b, color.a
            end,
            set = function(_, r, g, b, a)
                IncDB.fontColor.r = r
                IncDB.fontColor.g = g
                IncDB.fontColor.b = b
                IncDB.fontColor.a = a
                for _, text in ipairs(buttonTexts) do
                    text:SetTextColor(r, g, b, a)
                end
            end,
            order = 5,
        },
        buttonColor = {
            type = "color",
            name = "Button Color",
            desc = "Set the color of the buttons.",
            hasAlpha = true,
            get = function()
                local color = IncDB.buttonColor or {r = 1, g = 0, b = 0, a = 1} -- Default to red
                return color.r, color.g, color.b, color.a
            end,
            set = function(_, r, g, b, a)
                IncDB.buttonColor.r = r  
                IncDB.buttonColor.g = g 
                IncDB.buttonColor.b = b 
                IncDB.buttonColor.a = a 
                applyButtonColor() 
            end,
            order = 6,
The full code can be seen at: https://github.com/The-Sickness/Incoming-BG

Any help on this will be greatly appreciated.
  Reply With Quote
01-06-24, 02:13 PM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,934
A quick look at the changes between 10.2 and 10.2.5 and it looks like the file has had a few changes which might affect the functionality. But I am surprised that there are no errors if it is just an access change.

An example:
Removed: OpenColorPicker(info)
Added: ColorPickerFrame:SetupColorPickerAndShow(info)

Aha, looking at the xml file - It has gone from a ColorSelect type to a Frame type.
<ColorSelect name="ColorPickerFrame" toplevel="true" parent="UIParent" movable="true" enableMouse="true" enableKeyboard="true" hidden="true" frameStrata="DIALOG">

<Frame name="ColorPickerFrame" mixin="ColorPickerFrameMixin" toplevel="true" parent="UIParent" movable="true" clampedToScreen="true" hidden="true" frameStrata="DIALOG">

https://github.com/Gethe/wow-ui-sour...ickerFrame.xml


Ace doesn't appear to have been updated since 10.1.5 but there is a ColorPickerPlus addon by them that has been updated sooner.

https://github.com/WoWUIDev
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
01-06-24, 02:28 PM   #3
Sharpedge
A Wyrmkin Dreamwalker
 
Sharpedge's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2022
Posts: 54
Thanks for the info man. I will look into it.
  Reply With Quote
01-10-24, 01:34 AM   #4
SteVex
A Kobold Labourer
Join Date: Jan 2024
Posts: 1
Have you checked the changes in the Color Picker functionality between versions 10.2 and 10.2.5? Also, have you considered exploring addons like ColorPickerPlus by WoWUIDev, which might have updates addressing the issue?

Sharpedge, have you made any progress in resolving the Color Picker issue in your addon?
  Reply With Quote
01-10-24, 06:26 AM   #5
Sharpedge
A Wyrmkin Dreamwalker
 
Sharpedge's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2022
Posts: 54
Originally Posted by SteVex View Post
Have you checked the changes in the Color Picker functionality between versions 10.2 and 10.2.5? Also, have you considered exploring addons like ColorPickerPlus by WoWUIDev, which might have updates addressing the issue?

Sharpedge, have you made any progress in resolving the Color Picker issue in your addon?
ColorPickerPlus does not work in 10.2.5 as well. I'm still tinkering with it all. I may just do away with the color picker all together and go another route with just picking solid colors.
  Reply With Quote
01-10-24, 09:00 AM   #6
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
If Ace has an alpha/beta for 10.2.5, use that otherwise, wait for the 10.2.5 version. Blizz changed how the ColorPicker is constructed and some of the methods. Your current (and likely soon to be old) version of Ace ColorPicker won't work with it. It will likely be the same for ColorPickerPlus if it is using default CP methods to "replace" it.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 01-10-24 at 01:12 PM.
  Reply With Quote
01-10-24, 06:55 PM   #7
Sharpedge
A Wyrmkin Dreamwalker
 
Sharpedge's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2022
Posts: 54
Originally Posted by Fizzlemizz View Post
If Ace has an alpha/beta for 10.2.5, use that otherwise, wait for the 10.2.5 version. Blizz changed how the ColorPicker is constructed and some of the methods. Your current (and likely soon to be old) version of Ace ColorPicker won't work with it. It will likely be the same for ColorPickerPlus if it is using default CP methods to "replace" it.
No Beta version just yet. I'm just going to hold off and wait and see what they do.
  Reply With Quote
01-11-24, 11:12 AM   #8
ClyAbext
A Kobold Labourer
Join Date: Jan 2024
Posts: 1
It seems like the changes in the Color Picker functionality between versions might be the culprit. Have you considered updating your code to reflect the changes highlighted in the example, and have you encountered any other compatibility issues between versions that you're addressing in your addon development?
  Reply With Quote
01-11-24, 11:47 AM   #9
Sharpedge
A Wyrmkin Dreamwalker
 
Sharpedge's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2022
Posts: 54
Originally Posted by ClyAbext View Post
It seems like the changes in the Color Picker functionality between versions might be the culprit. Have you considered updating your code to reflect the changes highlighted in the example, and have you encountered any other compatibility issues between versions that you're addressing in your addon development?
I have messed with it. But it throws a lot of errors pertaining to Ace 3. So, after that I'm just going to wait and see what Ace does before I have revamp my addons.
  Reply With Quote
01-15-24, 06:06 PM   #10
Sharpedge
A Wyrmkin Dreamwalker
 
Sharpedge's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2022
Posts: 54
Testing the new updates now....

I'm tripping. I didn't read the changelog for Ace 3 lol. It's still broken. But they are aware of it.

Last edited by Sharpedge : 01-15-24 at 07:03 PM.
  Reply With Quote
01-23-24, 10:05 PM   #11
dragonflyy
An Aku'mai Servant
 
dragonflyy's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 32
Not sure if this will help you are not, the new color picker is acutally well made (in my opinion). I am leaving a small code snippet from my addon so anyone else can use it to use the new color picker. It's all contained in one function call now, and there is no callback.

Lua Code:
  1. ColorPickerFrame:SetupColorPickerAndShow({
  2.     r = colors.red,
  3.     g = colors.green,
  4.     b = colors.blue,
  5.     opacity = colors.alpha,
  6.     hasOpacity = true,
  7.     swatchFunc = function()
  8.         colors.red, colors.green, colors.blue = ColorPickerFrame:GetColorRGB()
  9.         colors.alpha = ColorPickerFrame:GetColorAlpha()
  10.         L.AttachedFrame.ScrollFrame.listView:Refresh()
  11.     end,
  12.     cancelFunc = function()
  13.         colors.red, colors.green, colors.blue, colors.alpha =
  14.         ColorPickerFrame.previousValues.r, ColorPickerFrame.previousValues.g,
  15.             ColorPickerFrame.previousValues.b, ColorPickerFrame.previousValues.a
  16.         L.AttachedFrame.ScrollFrame.listView:Refresh()
  17.     end
  18. })

An alternative way (this is more how Blizzard did this)
Lua Code:
  1. local info = {}
  2. info.r, info.g, info.b = colors.red, colors.green, colors.blue
  3. info.opacity = colors.alpha
  4. info.hasOpacity = true
  5. info.swatchFunc = function()
  6.     colors.red, colors.green, colors.blue = ColorPickerFrame:GetColorRGB()
  7.     colors.alpha = ColorPickerFrame:GetColorAlpha()
  8.     L.AttachedFrame.ScrollFrame.listView:Refresh()
  9. end
  10. info.cancelFunc = function()
  11.     colors.red, colors.green, colors.blue, colors.alpha =
  12.         ColorPickerFrame.previousValues.r, ColorPickerFrame.previousValues.g,
  13.         ColorPickerFrame.previousValues.b, ColorPickerFrame.previousValues.a
  14.     L.AttachedFrame.ScrollFrame.listView:Refresh()
  15. end
  16. ColorPickerFrame:SetupColorPickerAndShow(info)

Also one thing to note, the new window is moveable and it remembers where it was. It also has hex code for colors

Last edited by dragonflyy : 01-23-24 at 10:08 PM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Color Picker issues 10.2.5


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off