Download

FSlateDrawElement::MakeCustom() sample please?

Hello…

I’m kind of making a crashcourse on UMG making a custom widget (I’m trying a Radar Chart to my game).

Most of it is working, did all the 2 classes (the SWidget and the UWidget to expose on UMG), it’s working BUT it’s not rendering (OnPaint) what I need yet.

I looked at the entire API docs, and looks like the only class capable to AddVertices to a FSlateDrawElement is the FSlateElementBatcher through a further FillBatchBuffers call, but unfortunatelly I could not get how it works (Instantiate/Get a pointer to class and so on…).

On the other hand, the docs also points the MakeCustom() method, but on the entire engine code there is no Widget using it to point syntax or implementation method (render a filled triangle is more than enough to give me a direction).

Any help will be greatly appreciated.

Best Wishes!

creasso

Ok…

I made the UWidget derived class to encapsulate the SCompoundWidget derived one…
I made the SCompoundWidget class to encapsulate the ICustomSlateElement derived class’ TSharedPtr…
I made both the FRenderTarget representation class and the FCanvasProxy ones to make pointers inside the ICustomSlateElement…
The Render is configured on BeginRenderingCanvas() method without trouble, until got the ENQUEUE_UNIQUE_RENDER_COMMAND_THREEPARAMETER macro to work…

I’m calling the SlateDrawElement::MakeCustom() but the implemented DrawRenderThread() is not being called… :frowning:

Do I need call this manualy? If yes, it’s before or after the MakeCustom() method?

Hi Creasso,

Did you ever get anywhere with this? I am also looking for a sample of ICustomSlateElement derived widgets