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

Method Construct

Source/URLabEditor/Private/SMjStepModeIndicator.cpp:34–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32#include "Bridge/RpcDispatcher.h"
33
34void SMjStepModeIndicator::Construct(const FArguments& InArgs)
35{
36 CachedLabel = FText::FromString(TEXT("URLab: -"));
37 CachedColor = FLinearColor(0.35f, 0.35f, 0.35f, 1.0f);
38
39 ChildSlot
40 [SNew(SBorder)
41 .BorderImage(FAppStyle::GetBrush("WhiteBrush"))
42 .BorderBackgroundColor(this, &SMjStepModeIndicator::GetFillColor)
43 .Padding(FMargin(6.f, 2.f))
44 [SNew(STextBlock)
45 .Text(this, &SMjStepModeIndicator::GetLabel)
46 .ColorAndOpacity(FLinearColor::White)]];
47
48 // Poll every 0.5s — manager is sticky, no need for per-frame work.
49 RegisterActiveTimer(0.5f, FWidgetActiveTimerDelegate::CreateSP(this, &SMjStepModeIndicator::OnPoll));
50}
51
52EActiveTimerReturnType SMjStepModeIndicator::OnPoll(double, float)
53{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected