Added some simple explanation to get newbies like me up to speed for the meat of the information.
(Added some simple explanation to get newbies like me up to speed for the meat of the information.) |
|||
| Line 11: | Line 11: | ||
== Showing the color picker == | == Showing the color picker == | ||
The ColorPickerFrame is already defined by Blizzard. You can display it by simply calling: ColorPickerFrame:Show() | |||
However, displaying it is not enough if you want it to have any functionality. So, you also need to define the following three functions: | |||
* ColorPickerFrame.func() | |||
* ColorPickerFrame.opacityFunc() | |||
* ColorPickerFrame.cancelFunc() | |||
When you want to prompt the user to select a color, you need to assign your own callback functions to the ColorPickerFrame variables, set the currently selected color to your previous value, and show the ColorPickerFrame. | When you want to prompt the user to select a color, you need to assign your own callback functions to the ColorPickerFrame variables, set the currently selected color to your previous value, and show the ColorPickerFrame. | ||