WoW:Using the ColorPickerFrame: Difference between revisions

m
Move page script moved page Using the ColorPickerFrame to WoW:Using the ColorPickerFrame without leaving a redirect
m (Move page script moved page Using the ColorPickerFrame to WoW:Using the ColorPickerFrame without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{UIHowTo}}
{{wow/uihowto}}
'''ColorPickerFrame''' is a FrameXML-provided frame that is used by the UI to allow the user to customize color and opacity properties of various objects. The frame can also be used by third-party addons.
'''ColorPickerFrame''' is a FrameXML-provided frame that is used by the UI to allow the user to customize color and opacity properties of various objects. The frame can also be used by third-party addons.


Line 62: Line 62:
This can then be used with the previously described ShowColorPicker function:
This can then be used with the previously described ShowColorPicker function:
  ShowColorPicker(r, g, b, a, myColorCallback);
  ShowColorPicker(r, g, b, a, myColorCallback);
==Limitations==
[[File:ColorPickerTools.jpg|320px|right|thumb|ColorTools.]]
The color picker has three main limitations:
*You have no way to know exactly which color is chosen (no color code)
*You can't copy color values from one instance of the color picker to another one
*You cannot move the color picker in case it obscures another underlying frame
All these problems are solved with the addon [http://wow.curse.com/downloads/wow-addons/details/colortools.aspx ColorTools ].
==Note==
As [[User:Exawatt|Exawatt]] stated, ColorPickerFrame:SetColorRGB(R, G, B) will execute ColorPickerFrame.func
This is very important when you're reusing ColorPickerFrame with another callback function. In that case make sure you set the new callback before you call SetColorRGB(R, G, B)
Anonymous user