So my project is coming along well. Im essentially making a 2D game out of widgets, just a click and point type deal.
Its starting to get…Large to say the least. Im super into compressing and organising and was wondering weither its better to split my screen up into 5 seperate widgets, And call them all rather than have one master interface that does everything.
When it comes to cleaniness/organisation or pure performance, what would be the better option?
You can do it either way. But we did one project with a monolithic widget and it got big real quick. All subsequent projects we broke widgets out into individual screens. Much more maintainable and manageable for code.
Keep in mind if you separate widgets then the order they are added to the display matters. No element of a widget added later can appear “below” a widget added earlier.
You’ll also want to manage how the widgets are added. We used the HUD CPP class to manage them all.
Thanks, Ill take alook into those now! They look exactly what Im looking for. I think my widget/umg/Ui game is quite weak.
Just started reading the document
“Most of the time when I’m working I see lots of crazy layouts including multiple size boxes and canvas nested in another canvas and all these other ways to try to control the layout size. These then become fragile and overly complicated widgets…”
I feel personally attacked
Yeah this is perfect. Im going to have a good read of this and start googling keywords.
I can also recommend CommonUI as @BIGTIMEMASTER suggested.
Adding everything to a master widget might seem simply at first but turns into a horrible mess if your UI isn’t super simple to begin with.
Having installed common Ui,
It is a baffling bit of kit. I dont really know where to start or what to use it for, With tutorials thin on the ground.
Im concerned Ill accidently blend old widgets and new widgets and create this carnage middle ground which is even worse.
Infact I think my question sits at one, Is there a way to specifically size a grid to a pixal?
For example I currently have my canvas panal laid out in specific pixals. But I want to swap the canvas panal for a grid, But the grids dont seem to work in pixals.
equally my work area just doesnt seem sized correctly?
This is showing my area is set to 2560x1440.
Yet an image set at 1440 goes off the bottom meaning that the work area cannot be 2560x1440?
I can change the area to custom and set it, But the viewport wont see it as such.
I have stumbled into some big old roadblocks that I think Ive just flailed around and avoided to this point. lol I can feel alot of tutorials coming up in my future.