Slate, Buttons not Working (Overlap?)

Hi guys,

I’m new to Slate, could you help me why my Buttons are not working?
After a few hours of trial and error I’m kinda frustrated.
Thanks in advance!

Note: The Buttons start after the //Lower Row comment.
I showed the whole thing because I think there’s some overlap with the earlier slate widgets.

BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION
void SMainMenuUI::Construct(const FArguments& InArgs)
{
	MainHUD = InArgs._MainHUD;

	ChildSlot
		.HAlign(HAlign_Left)
		.VAlign(VAlign_Top)
		.Padding(FMargin(0))
		[
			SNew(SBorder)

			.BorderBackgroundColor(FLinearColor::Red)
			.Padding(FMargin(15))
			.Content()
			[							
				SNew(SVerticalBox)

				// Upper Row
				+ SVerticalBox::Slot()
				[
					SNew(SHorizontalBox)

					+ SHorizontalBox::Slot()
					.AutoWidth()
					[
						SNew(SHorizontalBox)

						+ SHorizontalBox::Slot()
						[
							SNew(SBorder)
							.BorderBackgroundColor(FLinearColor::Blue)
							.Content()
							[
								SNew(STextBlock)
								.ColorAndOpacity(FLinearColor::White)
								.ShadowColorAndOpacity(FLinearColor::Black)
								.ShadowOffset(FIntPoint(-1, 1))
								.Font(FSlateFontInfo("Arial", 26))
								.Text(FText::FromString("Numbers Stuff"))
							]
						]

						+ SHorizontalBox::Slot()
						.AutoWidth()
						[
							SNew(SBorder)
							.BorderBackgroundColor(FLinearColor::Yellow)
							.Content()
							[
								SNew(STextBlock)
								.ColorAndOpacity(FLinearColor::White)
								.ShadowColorAndOpacity(FLinearColor::Black)
								.ShadowOffset(FIntPoint(-1, 1))
								.Font(FSlateFontInfo("Arial", 26))
								.Text(FText::FromString("Money"))
							]
						]

						+ SHorizontalBox::Slot()
						.AutoWidth()
						[
							SNew(SBorder)
							.BorderBackgroundColor(FLinearColor::Yellow)
							.Content()
							[
								SNew(STextBlock)
								.ColorAndOpacity(FLinearColor::White)
								.ShadowColorAndOpacity(FLinearColor::Black)
								.ShadowOffset(FIntPoint(-1, 1))
								.Font(FSlateFontInfo("Arial", 26))
								.Text(FText::FromString("People"))
							]
						]

						+ SHorizontalBox::Slot()
						.AutoWidth()
						[
							SNew(SBorder)
							.BorderBackgroundColor(FLinearColor::Yellow)
							.Content()
							[
								SNew(STextBlock)
								.ColorAndOpacity(FLinearColor::White)
								.ShadowColorAndOpacity(FLinearColor::Black)
								.ShadowOffset(FIntPoint(-1, 1))
								.Font(FSlateFontInfo("Arial", 26))
								.Text(FText::FromString("Power"))
							]
						]	
					]
				]
					
				
				// Lower Row
				+ SVerticalBox::Slot()
				[
					SNew(SHorizontalBox)

					+ SHorizontalBox::Slot()
					.AutoWidth()
					[	
						SNew(SHorizontalBox)

						+ SHorizontalBox::Slot()
						[
							SNew(SBorder)
							.BorderBackgroundColor(FLinearColor::Blue)
							.Content()
							[
								SNew(STextBlock)
								.ColorAndOpacity(FLinearColor::White)
								.ShadowColorAndOpacity(FLinearColor::Black)
								.ShadowOffset(FIntPoint(-1, 1))
								.Font(FSlateFontInfo("Arial", 26))
								.Text(FText::FromString("Button Stuff"))
							]
						]				
						
						+ SHorizontalBox::Slot()
						[
							SNew(SBorder)
							.BorderBackgroundColor(FLinearColor::Yellow)
							.Content()
							[
								SNew(SButton)
								.Text(FText::FromString("Money Stuff"))
								.DesiredSizeScale(FVector2D(2.5, 2.5))			
								.OnClicked(this, &SMainMenuUI::PlayGameClicked)
							]
						]

						+ SHorizontalBox::Slot()
						[
							SNew(SBorder)
							.BorderBackgroundColor(FLinearColor::Yellow)
							.Content()
							[
								SNew(SButton)
								.Text(FText::FromString("People Stuff"))
								.DesiredSizeScale(FVector2D(2.5, 2.5))
								.OnClicked(this, &SMainMenuUI::QuitGameClicked)
							]
						]

						+ SHorizontalBox::Slot()
						[
							SNew(SBorder)
							.BorderBackgroundColor(FLinearColor::Yellow)
							.Content()
							[
								SNew(SButton)
								.Text(FText::FromString("Power Stuff"))
								.DesiredSizeScale(FVector2D(2.5, 2.5))
								.OnClicked(this, &SMainMenuUI::TestButtonClicked)
							]
						]
					]
				]
								
			]
		];
}
END_SLATE_FUNCTION_BUILD_OPTIMIZATION

All of the functions are like this:

FReply SMainMenuUI::PlayGameClicked()
{	
	if (GEngine)
	{
		GEngine->AddOnScreenDebugMessage(-1, 3.f, FColor::Blue, TEXT("Play Game Clicked"));
	}

	return FReply::Handled();	
}

Yet there’s no output. Anyone with Slate knowledge seeing some obvious mistake?

What it looks like in PIE:

http://i.imgur.com/PT7t3cv.png

I used the borders to see if there’s obvious overlap, but I guess I used them wrong.

Thanks for your time and help!

Thanks, I didn’t know about this tool.
Apparently, my widgets cover the entire screen.
The last widget I add is always the one in front.
This is the code I used to add the widgets:

	SAssignNew(MainMenuUI, SMainMenuUI).MainHUD(this);
	SAssignNew(ProvinceUI, SProvinceUI).MainHUD(this);

	if (GEngine->IsValidLowLevel())
	{
		GEngine->GameViewport->AddViewportWidgetContent(SNew(SWeakWidget).PossiblyNullContent(ProvinceUI.ToSharedRef()));
		GEngine->GameViewport->AddViewportWidgetContent(SNew(SWeakWidget).PossiblyNullContent(MainMenuUI.ToSharedRef()));
	}

Edit: Merged both of my widgets and it works now.
I still don’t know what I was doing wrong though. Did I try to use 2 HUDs?
Thanks Wurmloch83 for the hint!

Have you tried debugging this using the widget reflector which can be found under Window->Developer Tools? When you enable the option Pick Live Widget and hover over the widgets you can easily see the widget bounds and hirarchy. Just in case you did not notice this tool so far…