yeshjho
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu
Ah, I see what's going on now. First of all, since it works, don't touch anything 😉
If you want to know why...
- HBox and VBox have their own sizes, too. So if the size of the children gets bigger than its size, it'll clip their content. That was what's happening here: https://discord.com/channels/555424930502541343/1353175379455774811/1354168117038944438
- If you don't want the clipping and want only the alignment from the HBox/VBox, you can check the
SizeToContent
checkbox so their size gets dependent on their children.
- The SizeToContent
option disappeared here(https://discord.com/channels/555424930502541343/1353175379455774811/1354248987837861999) since you wrapped the HBox with a SizeBox, which has sized slots. Since the size of the HBox will now be determined by the slot, UE hides the size-related options from the details view.
- Your solution works because Instead of resizing the outer HBoxes, now you're resizing the inner ones(buttons) with ScaleBoxes.92 replies
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu
That's the only way I can think of
92 replies
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu
Is your HBox's
Size To Content
turned off?92 replies
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu

92 replies
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu

92 replies
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu
In Construct
92 replies
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu
But I guess that's all problem solved, right?
92 replies
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu

92 replies
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu
Huh, I might try subsequently calling
SetTextStyle
and SetButtonAlignment(true)
too, then (or try calling one only). If it's still not centered after calling those 2 functions, I have no idea.92 replies
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu
This one
92 replies
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu

92 replies
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu
You should use the
SetText
function of the Widget_StandardButton, since it'll deal with the visibility of the mLeftSlot
and the IconContainer
. Otherwise they'll remain visible even though they contain nothing, pushing the text to the right.92 replies
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu
Horizontal alignment being centered there doesn't mean the children of the widget the slot contains are also centered horizontally.
It simply means the button's position inside the hbox is aligned at center.
92 replies
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu
How are you initializing the buttons? i.e., how are you setting the texts?
92 replies
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu
You could choose any widget if you change the
Parent Widget Typ
to Direct(Any)
, but I guess it doesn't make sense to attach your widget to anywhere else since otherwise it'll hide other widgets... So yeah, going with Construct would be your best bet, I think.92 replies
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu
Ah, I've encountered it before. For me, I was adding a widget to
mMapObjectPanel
in Widget_Map
, but the widget disappeared the second time I open the map.
My guess was the game was detaching all the children and recreating the children every time(or the first time) I open the map, so I attached my widget to a different widget, in this case mMapScrollContainer
, and it didn't get disappear anymore.
Try different parent widget.92 replies
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu

92 replies
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu

92 replies
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu
Ooh seeing that you're putting your buttons above the vanilla one, not below it, it would have been much much simpler to do it with blueprint hooking, adding a widget under the overlay and manually adjusting the position. That's how I've added Cartograph's "Cartograph: Initializing..." text at the top right corner. I didn't use C++ for that. The only reason I've done that way to add the Show/Hide Cartograph menu button was that I needed that horizontal box because the width of the vanilla button changes depending on its state (the widths of "Show" and "Hide" are different). But I don't think that's the case for you, so manually adding would have alleviated the headache a lot 😅
Anyway, about the size box, the size box doesn't actually "sizes" its contents. It just changes the size it reports to its parent. If you want its child to automatically scale depending on the size(height) of the size box, you should use scale box.
92 replies
SMSatisfactory Modding
•Created by Epp on 3/23/2025 in #help-developing-mods
Adding my own buttons to BPW_MapMenu

92 replies