//简单智能
SNew ( STextComboBox ). ContentPadding (5). OptionsSource (& Options ). InitiallySelectedItem ( Options [ 0 ] ) . OnSelectionChanged ( this , & FEditorModeTestEdModeToolkit :: OnPresetChanged )
//选择改变后的方法
void FEditorModeTestEdModeToolkit :: OnPresetChanged ( TSharedPtr < FString > NewSelection , ESelectInfo :: Type SelectInfo )
{
if ( SelectInfo != ESelectInfo :: Direct )
{
FString const NewPresetName = * NewSelection . Get ();
for ( int i =0; i < Options . Num (); i ++)
{
if ( * Options [ i ] == NewPresetName )
{
}
}
}
}
//灵活复杂
SNew ( SComboBox < FComboItemType >)
. ContentPadding (5)
. OptionsSource (& Options )
. InitiallySelectedItem ( Options [ 0 ] )