MCPcopy Create free account
hub / github.com/URLab-Sim/UnrealRoboticsLab / Construct

Method Construct

Source/URLabEditor/Private/SMjBridgeServerToggle.cpp:26–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24} // namespace
25
26void SURLabBridgeServerToggle::Construct(const FArguments& InArgs)
27{
28 CachedLabel = FText::FromString(TEXT("Bridge: -"));
29 CachedButtonText = FText::FromString(TEXT("Start"));
30 CachedColor = FLinearColor(0.35f, 0.35f, 0.35f, 1.0f);
31
32 ChildSlot
33 [SNew(SHorizontalBox)
34 + SHorizontalBox::Slot()
35 .AutoWidth()
36 .VAlign(VAlign_Center)
37 [SNew(SBorder)
38 .BorderImage(FAppStyle::GetBrush("WhiteBrush"))
39 .BorderBackgroundColor(this, &SURLabBridgeServerToggle::GetFillColor)
40 .Padding(FMargin(6.f, 2.f))
41 [SNew(STextBlock)
42 .Text(this, &SURLabBridgeServerToggle::GetLabelText)
43 .ColorAndOpacity(FLinearColor::White)]]
44 + SHorizontalBox::Slot()
45 .AutoWidth()
46 .VAlign(VAlign_Center)
47 .Padding(FMargin(4.f, 0.f, 0.f, 0.f))
48 [SNew(SButton)
49 .Text(this, &SURLabBridgeServerToggle::GetButtonText)
50 .OnClicked(this, &SURLabBridgeServerToggle::OnButtonClicked)]];
51
52 RegisterActiveTimer(0.5f,
53 FWidgetActiveTimerDelegate::CreateSP(this, &SURLabBridgeServerToggle::OnPoll));
54}
55
56EActiveTimerReturnType SURLabBridgeServerToggle::OnPoll(double, float)
57{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected