Hello.
I’ve been working with slate now for a few years and only recently have delved into the SNumericEntryBox widget and it doesn’t appear to be working for me? I have search the engine code for uses of it and can’t understand why my implementation isn’t working.
The widget is created at runtime, but I am unable to commit any numbers to the text box. I have even placed some breakpoints in the ValueChanged and ValueCommitted event handlers in the SNumerEntryBox source code and it seems that after the text is committed (via hitting the return key) the Commit event is fired, but then another value change event setting the value back to 0 is called. I’m also trying to use SVectorInputBox and SRotatorInputBox, which use the SNumericEntryBox.
All of this has been tested using a fresh project.
Does anyone have any incite into what is happening here? I’ve spent over a full day just trying to figure this out.
Video: http://www.nervenet.net/videos/NumericEntryBoxBug.mp4
Project/Plugin Files: http://www.nervenet.net/videos/NumericPluginProject.rar
void STestWindow::Construct(const FArguments& InArgs)
{
SWindow::Construct(SWindow::FArguments()
.Title(LOCTEXT("TestWindowTitleLabel", "Test Window"))
.CreateTitleBar(true)
.bDragAnywhere(true)
.FocusWhenFirstShown(true)
.HasCloseButton(true)
.SupportsMaximize(false)
.SupportsMinimize(true)
.IsInitiallyMaximized(false)
.IsInitiallyMinimized(false)
.AutoCenter(EAutoCenter::PrimaryWorkArea)
.SizingRule(ESizingRule::Autosized)
.MinWidth(360)
.MinHeight(100)
SNew(SVerticalBox)
+ SVerticalBox::Slot()
.AutoHeight().HAlign(HAlign_Fill).VAlign(VAlign_Center).Padding(1.0f)
SNew(SNumericEntryBox)
.Value(50.0f)
]
+ SVerticalBox::Slot()
.AutoHeight().HAlign(HAlign_Fill).VAlign(VAlign_Center).Padding(1.0f)
SNew(SVectorInputBox)
.bColorAxisLabels(true)
.X(0.0f).Y(0.0f).Z(0.0f)
]
+ SVerticalBox::Slot()
.AutoHeight().HAlign(HAlign_Fill).VAlign(VAlign_Center).Padding(1.0f)
SNew(SRotatorInputBox)
.bColorAxisLabels(true)
.Roll(0.0f).Pitch(0.0f).Yaw(0.0f)
]
+ SVerticalBox::Slot()
.AutoHeight().HAlign(HAlign_Fill).VAlign(VAlign_Center).Padding(1.0f)
SNew(SRotatorInputBox)
.AllowSpin(true)
.bColorAxisLabels(true)
.Roll(0.0f).Pitch(0.0f).Yaw(0.0f)
]
]
);
}