I am creating a new SWindow and filling it with Content:
SAssignNew(ControlWindow_SharedPtr, SWindow).Content() [ ... ];
Part of the Content are ComboBoxes.
But the SComboBoxes are not showing any of the Options they are given:
TArray<TSharedPtr <FString>> Array_Resolutions = {MakeShareable<FString>(new FString("2560 x 1440")), MakeShareable<FString>(new FString("1920 x 1080"))};
[…]
SNew(SHorizontalBox)
+ SHorizontalBox::Slot()
.VAlign(VAlign_Center)
.HAlign(HAlign_Center)
[
SNew(STextBlock)
.Text(FText::FromString("Resolution:"))
.ToolTipText(FText::FromString("Change the resolution of the output window (Width x Height)."))
]
+SHorizontalBox::Slot()
.VAlign(VAlign_Center)
.HAlign(HAlign_Center)
[
SNew(SComboBox<TSharedPtr<FString>>)
.OptionsSource(&Array_Resolutions)
.OnSelectionChanged_Lambda([](TSharedPtr<FString>, ESelectInfo::Type)
{
})
.InitiallySelectedItem(Array_Resolutions[1])
]
[…]
Does anybody know why the ComboBoxes do not hold the Array Items as Options?
The ComboBox with the Resolution should hold both Strings (2560 x 1440 and 1920 x 1080).
(The code for the ‘Mode’ ComboBox is basically a copy paste of this one just with some other array).
Clicking on the ComboBoxes is crashing both the game and the editor.