I’m at a loss here. I can’t add Common Text to a Common Button. How the heck else am I supposed to add text then? lol. Adding text outside of the button causes a disconnect between the twos state and would require a ton of pass through functions for each button to pass state through.
Regular Buttons can have Text child elements perfectly fine, but then I’ve to manually setup the style for every single button. I’m using a Common Button so I can reuse the button style. There is no default Common Button though so the documentation instructed to make one via BP so I did.
The above illustrates this entire issue. Does anyone have any idea how to fix this? I CAN add Common Text inside of BP_UI_Element_Button, BUT the text then can’t be edited nor properly sized outside of that widget causing me to lose the reusability benefit AND it’s extremely buggy causing the widget to just randomly corrupt and no longer let me save changes.
So how is everyone doing buttons without having to copy-paste like crazy?
On top of that when I use a Common Text Style for the Common Text it refuses to let me change the font side for the individual instance of of the CommonText on the button.
Ok, found the cause of the text being way off. If you add padding to the Horizontal Box it throws everything way off. I however still can’t change the font size of the CommonText.
No matter what I do I can’t get padding to work with variably sized buttons. They must all be statically sized (e.g. same width and height) or the padding will throw the text and icons outside of the buttons. Christ the UI functionality is a nightmare. This was a lot more fun when I was just coding the game, lol.
Seams like all my problems are with just trying to use Common Buttons, but they don’t seam necessary for Common UI? Dragging a regular button in still seams to take focus and allow keyboard navigation just fine. I think I’ll just copy-paste my buttons for the time being as the share styles system is really just not good.
lol, well got Common Button working. Was thinking about it all wrong. In the Common Button I simply defined the structure and mostly ignored how it looked in the preview. Then in my main widget put the button inside of a Size Box and defined what size I want and those are inside of a Horizontal Box. As for the font size I defined a style SPECIFICALLY for Main Menu buttons that inherits from another BP to define the font family default style. Then just override what values I wanted that were relevant to the main menu.