| 32 | #include "Bridge/RpcDispatcher.h" |
| 33 | |
| 34 | void 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 | |
| 52 | EActiveTimerReturnType SMjStepModeIndicator::OnPoll(double, float) |
| 53 | { |
nothing calls this directly
no outgoing calls
no test coverage detected