Fandom

WoWWiki

UIOBJECT ColorSelect

104,669pages on
this wiki
Add New Page
Talk0 Share
Widget API < ColorSelect

If you want to use a ColorSelect widget, you may want to consider using the Using the ColorPickerFrame. This is a frame already defined by Blizzard. You can display it by calling: ColorPickerFrame:Show()

However, displaying it is not enough. You also need to define three functions:

  • ColorPickerFrame.func()
  • ColorPickerFrame.opacityFunc()
  • ColorPickerFrame.cancelFunc()

Examples Edit

ColorPickerFrame.func = my_cpf_func;
ColorPickerFrame.opacityFunc = my_cpf_opacityfunc;
ColorPickerFrame.cancelFunc = my_cpf_cancelfunc;
function my_cpf_func()
print( "my_cpf_func()");
-- called when any member function is called on a ColorPickerFrame object
-- called numerous times when a point is clicked on the color wheel
-- called numerous times when a point is clicked on the shader bar
end
function my_cpf_opacityfunc()
print("my_cpf_opacityfunc()");
-- called when the user clicks the "Okay" button that is on the ColorPickerFrame
end
function my_cpf_cancelfunc()
print("my_cuf_cancelfunc()");
-- called when the user clicks the "Cancel" button that is on the ColorPickerFrame
end

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki