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

Method BindToCamera

Source/URLab/Private/UI/MjCameraFeedEntry.cpp:34–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32#include "Fonts/SlateFontInfo.h"
33
34void UMjCameraFeedEntry::BindToCamera(UMjCamera* InCamera)
35{
36 if (!InCamera)
37 return;
38 BoundCamera = InCamera;
39
40 InCamera->SetStreamingEnabled(true);
41
42 if (CameraNameText)
43 {
44 CameraNameText->SetText(FText::FromString(InCamera->MjName));
45 FSlateFontInfo FontInfo = CameraNameText->GetFont();
46 FontInfo.Size = 12;
47 FontInfo.TypefaceFontName = TEXT("Bold");
48 CameraNameText->SetFont(FontInfo);
49 CameraNameText->SetColorAndOpacity(FSlateColor(FLinearColor(0.8f, 0.9f, 1.0f, 1.0f)));
50 }
51
52 RefreshBrush();
53}
54
55void UMjCameraFeedEntry::RefreshBrush()
56{

Callers 1

Calls 1

SetStreamingEnabledMethod · 0.80

Tested by

no test coverage detected