[Tutorial] Custom GUI using Slate Styles (C++)

Hi!

I created a simple UI library that allows you to create Widgets like resource bars and skill buttons panels without much effor in C++. All of them are skinned through Slate Style assets and easy to tweak.

Library was created in a form of separate, independent module so if you’re interested in creating custom modules you should definitely check it out ; )

Heres just a simple example of how your UI can look like using this library:

Whole tutorial can be found at Tutorial: Custom GUI with Slate Styles | Unreal Engine 4 blog

Feel free to use and/or modify any code included!

I briefly skimmed your tutorial and it looks nice! What would be the benefit to keep using Slate with the UMG release being so imminent?

UMG wont replace Slate, it’s a visual editor for it.
Sure, it will be much easier to create basic menus with UMG and I’m sure it will be more than enough for most of you. But if you’re looking for some custom/more complex widgets you will still have to code them.

So there is no reason to turn your back on Slate declarative syntax (yet:>).

I’ll be improving my library to create “UMG version” of resource bar and skills panel in the future so maybe then it will be more attractive than raw C++ ; )

Nice!

But, is your skill panel supporting drag&drop ? To equip any ability into any slot at runtime ?
It looks to me like a lot of logic have gone into slate to support abilities.
I have something simliar, though in my case, slate only display abilities, everything else is handled player controller.

Idea behind this library was to create standalone module that will contain useful slate widgets. This is still WIP and I’m still working on improvements;)

Drag&drop is on my todo list with high priority ; )

Great stuff Szyszek.

You can check out my github repo for implementation with Drag&drop. It’s currently going to be refactored to be more similiar to inventory, but idea is here.

I’m honestly not sure how viable would be making it into separate module. It’s honestly (at least in my case), very specific system, dependant on other system (like actors, and components), to actually activate and get data from. Trying to abstract that to be usable by anything could prove to be more trouble than it is worth.

Though, good luck! Waiting for updates, if you come with some nice solution it would be nice to see it!

Drag&Drop: Awesome! I believe someone told me that there was some working being done on Drag and drop in the UE4 repository? May be good to look into before putting a lot of time into :slight_smile:

szyszek, you’re right. Although UMG is turning out to be pretty Epic, doing stuff in C++ Slate will not go again - I completely overlooked this in my excitement for UMG :smiley:

My only question is how do we make the assets for the styles? What are the specs for resizable widgets?