How do i use SColorWheel OnValueChanged?

Hi,

Could someone show me some example of how to use the slate SColorWheel OnValueChanged ?

I’d like to make a color picker, i managed to have the other FArguments working but OnValueChanged is stronger than me. The return type is this beast:

typedef TBaseDelegate_OneParam< void, FLinearColor > FOnLinearColorValueChanged

That is way way above my poor beginner skills, not to mention puting this into a bind.

I don’t know how to get the picked up color into a variable. I suppose it is the FLinearColor in the template declaration but i can’t make it work.

Should i declare a function that returns a FOnLinearColorValueChanged ? But then what do i return in my function ? Or should it be a function that returns a void and take a FLinearColor argument ? I tried all i could but didn’t find the right thing to do.

Continuing my tests. If i find something i will post the answer, but if someone already knows…

Thanks

Cedric

A little bit of progress:

// construct:
+ SVerticalBox::Slot()
					[
						SNew(SColorWheel)
						.OnValueChanged(this, &SYagMenuWelcomeWidget::ColorDelegate)
					] 

// function:
void SYagMenuWelcomeWidget::ColorDelegate(FLinearColor NewColor)
{
	YagMenuWelcomeHUD->SetYagPLayerColor(NewColor);
}

I can see my color changing in real time when the mouse moves over the SColorWheel, but the color i see on the pawn has no connection with the color on the color wheel (same with SColorSpectrum).

Continuing the tests, will update when it works.

Cedric