Download LyraStarterGame/Source/LyraGame/UI/LyraActivatableWidget.cpp from Alexhas2/unitysamples: direct link, hf CLI and curl.
- Browser
- Download file 1.97 kB
-
https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/UI/LyraActivatableWidget.cpp
- Command line
-
hf download hf://datasets/Alexhas2/unitysamples/LyraStarterGame/Source/LyraGame/UI/LyraActivatableWidget.cpp
-
curl -L -o LyraActivatableWidget.cpp https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/UI/LyraActivatableWidget.cpp
1.97 kB
| // Copyright Epic Games, Inc. All Rights Reserved. | |
| ULyraActivatableWidget::ULyraActivatableWidget(const FObjectInitializer& ObjectInitializer) | |
| : Super(ObjectInitializer) | |
| { | |
| } | |
| TOptional<FUIInputConfig> ULyraActivatableWidget::GetDesiredInputConfig() const | |
| { | |
| switch (InputConfig) | |
| { | |
| case ELyraWidgetInputMode::GameAndMenu: | |
| return FUIInputConfig(ECommonInputMode::All, GameMouseCaptureMode); | |
| case ELyraWidgetInputMode::Game: | |
| return FUIInputConfig(ECommonInputMode::Game, GameMouseCaptureMode); | |
| case ELyraWidgetInputMode::Menu: | |
| return FUIInputConfig(ECommonInputMode::Menu, EMouseCaptureMode::NoCapture); | |
| case ELyraWidgetInputMode::Default: | |
| default: | |
| return TOptional<FUIInputConfig>(); | |
| } | |
| } | |
| void ULyraActivatableWidget::ValidateCompiledWidgetTree(const UWidgetTree& BlueprintWidgetTree, class IWidgetCompilerLog& CompileLog) const | |
| { | |
| Super::ValidateCompiledWidgetTree(BlueprintWidgetTree, CompileLog); | |
| if (!GetClass()->IsFunctionImplementedInScript(GET_FUNCTION_NAME_CHECKED(ULyraActivatableWidget, BP_GetDesiredFocusTarget))) | |
| { | |
| if (GetParentNativeClass(GetClass()) == ULyraActivatableWidget::StaticClass()) | |
| { | |
| CompileLog.Warning(LOCTEXT("ValidateGetDesiredFocusTarget_Warning", "GetDesiredFocusTarget wasn't implemented, you're going to have trouble using gamepads on this screen.")); | |
| } | |
| else | |
| { | |
| //TODO - Note for now, because we can't guarantee it isn't implemented in a native subclass of this one. | |
| CompileLog.Note(LOCTEXT("ValidateGetDesiredFocusTarget_Note", "GetDesiredFocusTarget wasn't implemented, you're going to have trouble using gamepads on this screen. If it was implemented in the native base class you can ignore this message.")); | |
| } | |
| } | |
| } | |