Wikia

WoWWiki

Watchlist Recent changes

UIOBJECT 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()

Example CodeEdit

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

Pages on WoWWiki

94,213pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
55,642photos on this wiki
See more >

Recent Wiki Activity

See more >

Recent Questions

Around Wikia's network

Random Wiki