mirror of
https://github.com/litruv/TobiiEyetracking.git
synced 2026-07-24 18:56:09 +10:00
Added Tobii from 4.23 + updated
This commit is contained in:
154
Source/TobiiCore/Private/UserGuide/STobiiLicenseWindow.cpp
Normal file
154
Source/TobiiCore/Private/UserGuide/STobiiLicenseWindow.cpp
Normal file
@@ -0,0 +1,154 @@
|
||||
/******************************************************************************
|
||||
* Copyright 2017- Tobii Technology AB. All rights reserved.
|
||||
*
|
||||
* @author Temaran | Fredrik Lindh | fredrik.lindh@tobii.com | https://github.com/Temaran
|
||||
******************************************************************************/
|
||||
|
||||
#if WITH_EDITOR
|
||||
|
||||
#include "STobiiLicenseWindow.h"
|
||||
#include "STobiiWelcomeWindow.h"
|
||||
|
||||
#include "CoreGlobals.h"
|
||||
#include "Editor.h"
|
||||
#include "UnrealClient.h"
|
||||
#include "EditorStyleSet.h"
|
||||
#include "Framework/Application/SlateApplication.h"
|
||||
#include "Misc/ConfigCacheIni.h"
|
||||
#include "Misc/FileHelper.h"
|
||||
#include "Widgets/Layout/SGridPanel.h"
|
||||
#include "Widgets/Layout/SScrollBox.h"
|
||||
#include "Widgets/Images/SImage.h"
|
||||
#include "Widgets/Text/STextBlock.h"
|
||||
#include "Widgets/Input/SButton.h"
|
||||
|
||||
#define LOCTEXT_NAMESPACE "TobiiLicenseWindow"
|
||||
|
||||
void STobiiLicenseWindow::Construct(const FArguments& InArgs, FTobiiCoreModule* InCoreModule)
|
||||
{
|
||||
if (GEditor == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
CoreModule = InCoreModule;
|
||||
|
||||
#if TOBII_COMPILE_AS_ENGINE_PLUGIN
|
||||
FString LicenseFilePath = FPaths::EnginePluginsDir() / TEXT("Runtime/TobiiEyetracking/Resources/License.txt");
|
||||
#else
|
||||
FString LicenseFilePath = FPaths::ProjectPluginsDir() / TEXT("TobiiEyetracking/Resources/License.txt");
|
||||
#endif
|
||||
|
||||
FString LicenseText;
|
||||
bool bCanAccept = true;
|
||||
if (!FFileHelper::LoadFileToString(LicenseText, *LicenseFilePath))
|
||||
{
|
||||
LicenseText = "License file not found in Resources folder!\n\nAccept button disabled.\nIf you cannot repair/replace the Tobii SDK, please remove it from your project.";
|
||||
bCanAccept = false;
|
||||
}
|
||||
|
||||
SWindow::Construct(SWindow::FArguments()
|
||||
.SupportsMaximize(false)
|
||||
.SupportsMinimize(false)
|
||||
.IsPopupWindow(true)
|
||||
.CreateTitleBar(false)
|
||||
.SizingRule(ESizingRule::FixedSize)
|
||||
.SupportsTransparency(EWindowTransparency::None)
|
||||
.InitialOpacity(1.0f)
|
||||
.FocusWhenFirstShown(true)
|
||||
.bDragAnywhere(false)
|
||||
.ActivationPolicy(EWindowActivationPolicy::FirstShown)
|
||||
.ClientSize(FVector2D(1024, 768))
|
||||
.ScreenPosition(FVector2D((float)(GEditor->GetActiveViewport()->GetSizeXY().X) / 2.0,
|
||||
(float)(GEditor->GetActiveViewport()->GetSizeXY().Y) / 2.0))
|
||||
[
|
||||
SNew(SVerticalBox)
|
||||
+ SVerticalBox::Slot()
|
||||
.FillHeight(0.9f)
|
||||
.Padding(5)
|
||||
[
|
||||
SNew(SScrollBox)
|
||||
+SScrollBox::Slot()
|
||||
[
|
||||
SNew(SGridPanel)
|
||||
.FillColumn(0, 1.0f)
|
||||
.FillRow(0, 1.0f)
|
||||
|
||||
+ SGridPanel::Slot(0, 0)
|
||||
[
|
||||
SNew(SImage)
|
||||
.ColorAndOpacity(FSlateColor(FLinearColor(FColor::Black)))
|
||||
]
|
||||
|
||||
+ SGridPanel::Slot(0, 0)
|
||||
[
|
||||
SNew(STextBlock)
|
||||
.AutoWrapText(true)
|
||||
.Margin(10.0f)
|
||||
.Text(FText::FromString(LicenseText))
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
+ SVerticalBox::Slot()
|
||||
.FillHeight(0.05f)
|
||||
[
|
||||
SNew(SButton)
|
||||
.VAlign(VAlign_Center)
|
||||
.HAlign(HAlign_Fill)
|
||||
.IsEnabled(bCanAccept)
|
||||
.OnClicked(this, &STobiiLicenseWindow::AcceptLicense)
|
||||
[
|
||||
SNew(STextBlock)
|
||||
.Text(LOCTEXT("OkButton", "I Accept the terms of this agreement"))
|
||||
.Justification(ETextJustify::Center)
|
||||
]
|
||||
]
|
||||
+ SVerticalBox::Slot()
|
||||
.FillHeight(0.05f)
|
||||
[
|
||||
SNew(SButton)
|
||||
.VAlign(VAlign_Center)
|
||||
.HAlign(HAlign_Fill)
|
||||
.OnClicked(this, &STobiiLicenseWindow::ShutdownEditor)
|
||||
[
|
||||
SNew(STextBlock)
|
||||
.Text(LOCTEXT("ExitButton", "I do not accept the terms. Shut down editor so I can remove the plugin."))
|
||||
.Justification(ETextJustify::Center)
|
||||
]
|
||||
]
|
||||
]);
|
||||
|
||||
bIsTopmostWindow = true;
|
||||
FlashWindow();
|
||||
}
|
||||
|
||||
FReply STobiiLicenseWindow::AcceptLicense()
|
||||
{
|
||||
RequestDestroyWindow();
|
||||
|
||||
if (GConfig != nullptr)
|
||||
{
|
||||
GConfig->SetBool(TEXT("Tobii"), TEXT("TobiiLicenseAccepted"), true, GGameIni);
|
||||
}
|
||||
|
||||
bool bTutorialShown = false;
|
||||
GConfig->GetBool(TEXT("Tobii"), TEXT("TobiiTutorialShown"), bTutorialShown, GGameIni);
|
||||
if (!bTutorialShown && GEditor != nullptr)
|
||||
{
|
||||
FSlateApplication::Get().AddWindow(SNew(STobiiWelcomeWindow));
|
||||
}
|
||||
|
||||
return FReply::Handled();
|
||||
}
|
||||
|
||||
FReply STobiiLicenseWindow::ShutdownEditor()
|
||||
{
|
||||
RequestDestroyWindow();
|
||||
FGenericPlatformMisc::RequestExit(false);
|
||||
return FReply::Handled();
|
||||
}
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
|
||||
#endif //WITH_EDITOR
|
||||
36
Source/TobiiCore/Private/UserGuide/STobiiLicenseWindow.h
Normal file
36
Source/TobiiCore/Private/UserGuide/STobiiLicenseWindow.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/******************************************************************************
|
||||
* Copyright 2017- Tobii Technology AB. All rights reserved.
|
||||
*
|
||||
* @author Temaran | Fredrik Lindh | fredrik.lindh@tobii.com | https://github.com/Temaran
|
||||
******************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if WITH_EDITOR
|
||||
|
||||
#include "../TobiiCoreModule.h"
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "SWebBrowser.h"
|
||||
#include "Widgets/SWindow.h"
|
||||
|
||||
class STobiiLicenseWindow : public SWindow
|
||||
{
|
||||
public:
|
||||
SLATE_BEGIN_ARGS(STobiiLicenseWindow) { }
|
||||
SLATE_END_ARGS()
|
||||
|
||||
STobiiLicenseWindow() {}
|
||||
|
||||
/** Widget constructor */
|
||||
void Construct(const FArguments& Args, FTobiiCoreModule* InCoreModule);
|
||||
|
||||
private:
|
||||
TSharedPtr<SWebBrowser> MainBrowser;
|
||||
FTobiiCoreModule* CoreModule;
|
||||
|
||||
FReply AcceptLicense();
|
||||
FReply ShutdownEditor();
|
||||
};
|
||||
|
||||
#endif //WITH_EDITOR
|
||||
214
Source/TobiiCore/Private/UserGuide/STobiiWelcomeWindow.cpp
Normal file
214
Source/TobiiCore/Private/UserGuide/STobiiWelcomeWindow.cpp
Normal file
@@ -0,0 +1,214 @@
|
||||
/******************************************************************************
|
||||
* Copyright 2017- Tobii Technology AB. All rights reserved.
|
||||
*
|
||||
* @author Temaran | Fredrik Lindh | fredrik.lindh@tobii.com | https://github.com/Temaran
|
||||
******************************************************************************/
|
||||
|
||||
#if WITH_EDITOR
|
||||
|
||||
#include "STobiiWelcomeWindow.h"
|
||||
|
||||
#include "Editor.h"
|
||||
#include "EditorStyleSet.h"
|
||||
#include "ContentBrowserModule.h"
|
||||
#include "IContentBrowserSingleton.h"
|
||||
#include "CoreGlobals.h"
|
||||
#include "UnrealClient.h"
|
||||
#include "Widgets/Layout/SGridPanel.h"
|
||||
#include "Widgets/Layout/SScrollBox.h"
|
||||
#include "Widgets/Images/SImage.h"
|
||||
#include "Widgets/Text/STextBlock.h"
|
||||
#include "Widgets/Input/SButton.h"
|
||||
#include "Widgets/Input/SCheckBox.h"
|
||||
#include "Misc/ConfigCacheIni.h"
|
||||
#include "Misc/FileHelper.h"
|
||||
#include "Modules/ModuleManager.h"
|
||||
|
||||
#define LOCTEXT_NAMESPACE "STobiiWelcomeWindow"
|
||||
|
||||
void STobiiWelcomeWindow::Construct(const FArguments& InArgs)
|
||||
{
|
||||
if (GEditor == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
bDontShowAgain = false;
|
||||
|
||||
SWindow::Construct(SWindow::FArguments()
|
||||
.SupportsMaximize(false)
|
||||
.SupportsMinimize(false)
|
||||
.IsPopupWindow(true)
|
||||
.CreateTitleBar(false)
|
||||
.SizingRule(ESizingRule::FixedSize)
|
||||
.SupportsTransparency(EWindowTransparency::None)
|
||||
.InitialOpacity(1.0f)
|
||||
.FocusWhenFirstShown(true)
|
||||
.bDragAnywhere(false)
|
||||
.ActivationPolicy(EWindowActivationPolicy::FirstShown)
|
||||
.ClientSize(FVector2D(600, 400))
|
||||
.ScreenPosition(FVector2D((float)(GEditor->GetActiveViewport()->GetSizeXY().X) / 2.0,
|
||||
(float)(GEditor->GetActiveViewport()->GetSizeXY().Y) / 2.0))
|
||||
[
|
||||
SNew(SGridPanel)
|
||||
.FillColumn(0, 1.0f)
|
||||
.FillRow(0, 1.0f)
|
||||
|
||||
+ SGridPanel::Slot(0, 0)
|
||||
[
|
||||
SNew(SImage)
|
||||
.ColorAndOpacity(FSlateColor(FLinearColor(FColor::Black)))
|
||||
]
|
||||
|
||||
+ SGridPanel::Slot(0, 0)
|
||||
[
|
||||
SNew(SVerticalBox)
|
||||
+ SVerticalBox::Slot()
|
||||
.Padding(10.0f)
|
||||
[
|
||||
SNew(STextBlock)
|
||||
.Justification(ETextJustify::Center)
|
||||
.Margin(5.0f)
|
||||
.Font(FEditorStyle::GetFontStyle(FName("ToggleButton.LabelFont")))
|
||||
.Text(FText::FromString("Tobii Sample Content"))
|
||||
]
|
||||
|
||||
+ SVerticalBox::Slot()
|
||||
.AutoHeight()
|
||||
[
|
||||
SNew(STextBlock)
|
||||
.AutoWrapText(true)
|
||||
.Margin(5.0f)
|
||||
.Text(FText::FromString("Thank you again for downloading the UE4 Tobii eyetracking plugin!.\nThis plugin comes loaded with sample content as well as the core functionality to enable your development environment to leverage the eyetracker hardware.\nThe sample content is packaged can be accessed via the content browser under the 'TobiiEyetracking' plugin section. As plugin content is not visible by default however, you need to first click the small eye button at the bottom right of your content browser and check the 'show plugin content' checkbox. After that you should be able to scroll your content browser down to see the category."))
|
||||
]
|
||||
|
||||
+ SVerticalBox::Slot()
|
||||
.AutoHeight()
|
||||
.Padding(15.0f)
|
||||
[
|
||||
SNew(SHorizontalBox)
|
||||
+SHorizontalBox::Slot()
|
||||
.AutoWidth()
|
||||
[
|
||||
SNew(SCheckBox)
|
||||
.IsChecked(bDontShowAgain ? ECheckBoxState::Checked : ECheckBoxState::Unchecked)
|
||||
.OnCheckStateChanged_Lambda([this](ECheckBoxState State) { bDontShowAgain = State == ECheckBoxState::Checked; })
|
||||
]
|
||||
+SHorizontalBox::Slot()
|
||||
.AutoWidth()
|
||||
[
|
||||
SNew(STextBlock)
|
||||
.Text(FText::FromString("Don't show this window again."))
|
||||
]
|
||||
]
|
||||
|
||||
+ SVerticalBox::Slot()
|
||||
.Padding(0.0f, 50.0f, 0.0f, 0.0f)
|
||||
[
|
||||
SNew(STextBlock)
|
||||
.Text(FText::FromString("Would you like to navigate to the samples now?"))
|
||||
]
|
||||
|
||||
+ SVerticalBox::Slot()
|
||||
.AutoHeight()
|
||||
[
|
||||
SNew(SButton)
|
||||
.VAlign(VAlign_Center)
|
||||
.HAlign(HAlign_Fill)
|
||||
.OnClicked(this, &STobiiWelcomeWindow::ShowDesktopSamples)
|
||||
[
|
||||
SNew(STextBlock)
|
||||
.Text(LOCTEXT("OkButton", "Yes, please show me the desktop samples"))
|
||||
.Justification(ETextJustify::Center)
|
||||
]
|
||||
]
|
||||
+ SVerticalBox::Slot()
|
||||
.AutoHeight()
|
||||
[
|
||||
SNew(SButton)
|
||||
.VAlign(VAlign_Center)
|
||||
.HAlign(HAlign_Fill)
|
||||
.OnClicked(this, &STobiiWelcomeWindow::ShowXRSamples)
|
||||
[
|
||||
SNew(STextBlock)
|
||||
.Text(LOCTEXT("OkButtonXR", "Yes, please show me the XR samples"))
|
||||
.Justification(ETextJustify::Center)
|
||||
]
|
||||
]
|
||||
+ SVerticalBox::Slot()
|
||||
.AutoHeight()
|
||||
[
|
||||
SNew(SButton)
|
||||
.VAlign(VAlign_Center)
|
||||
.HAlign(HAlign_Fill)
|
||||
.OnClicked(this, &STobiiWelcomeWindow::AbortTutorial)
|
||||
[
|
||||
SNew(STextBlock)
|
||||
.Text(LOCTEXT("ExitButton", "No thank you."))
|
||||
.Justification(ETextJustify::Center)
|
||||
]
|
||||
]
|
||||
]
|
||||
]);
|
||||
|
||||
bIsTopmostWindow = true;
|
||||
FlashWindow();
|
||||
}
|
||||
|
||||
void STobiiWelcomeWindow::UpdateFlag()
|
||||
{
|
||||
if (GConfig != nullptr && bDontShowAgain)
|
||||
{
|
||||
GConfig->SetBool(TEXT("Tobii"), TEXT("TobiiTutorialShown"), true, GGameIni);
|
||||
}
|
||||
}
|
||||
|
||||
FReply STobiiWelcomeWindow::ShowDesktopSamples()
|
||||
{
|
||||
RequestDestroyWindow();
|
||||
UpdateFlag();
|
||||
|
||||
//Actually turn on plugin content viewing and navigate the content browser to the sample
|
||||
IContentBrowserSingleton& ContentBrowserInterface = FModuleManager::LoadModuleChecked<FContentBrowserModule>(TEXT("ContentBrowser")).Get();
|
||||
ContentBrowserInterface.ForceShowPluginContent(false);
|
||||
|
||||
TArray<FAssetData> MapAsset;
|
||||
MapAsset.Add(FAssetData(FName("/TobiiEyetracking/Sample/Desktop/DesktopExampleMap")
|
||||
, FName("/TobiiEyetracking/Sample/Desktop")
|
||||
, FName("DesktopExampleMap")
|
||||
, FName("World")));
|
||||
ContentBrowserInterface.SyncBrowserToAssets(MapAsset);
|
||||
|
||||
return FReply::Handled();
|
||||
}
|
||||
|
||||
FReply STobiiWelcomeWindow::ShowXRSamples()
|
||||
{
|
||||
RequestDestroyWindow();
|
||||
UpdateFlag();
|
||||
|
||||
//Actually turn on plugin content viewing and navigate the content browser to the sample
|
||||
IContentBrowserSingleton& ContentBrowserInterface = FModuleManager::LoadModuleChecked<FContentBrowserModule>(TEXT("ContentBrowser")).Get();
|
||||
ContentBrowserInterface.ForceShowPluginContent(false);
|
||||
|
||||
TArray<FAssetData> MapAsset;
|
||||
MapAsset.Add(FAssetData(FName("/TobiiEyetracking/Sample/XR/XRExampleMap")
|
||||
, FName("/TobiiEyetracking/Sample/XR")
|
||||
, FName("XRExampleMap")
|
||||
, FName("World")));
|
||||
ContentBrowserInterface.SyncBrowserToAssets(MapAsset);
|
||||
|
||||
return FReply::Handled();
|
||||
}
|
||||
|
||||
FReply STobiiWelcomeWindow::AbortTutorial()
|
||||
{
|
||||
RequestDestroyWindow();
|
||||
UpdateFlag();
|
||||
|
||||
return FReply::Handled();
|
||||
}
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
|
||||
#endif //WITH_EDITOR
|
||||
38
Source/TobiiCore/Private/UserGuide/STobiiWelcomeWindow.h
Normal file
38
Source/TobiiCore/Private/UserGuide/STobiiWelcomeWindow.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/******************************************************************************
|
||||
* Copyright 2017- Tobii Technology AB. All rights reserved.
|
||||
*
|
||||
* @author Temaran | Fredrik Lindh | fredrik.lindh@tobii.com | https://github.com/Temaran
|
||||
******************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if WITH_EDITOR
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "SWebBrowser.h"
|
||||
#include "Widgets/SWindow.h"
|
||||
|
||||
class STobiiWelcomeWindow : public SWindow
|
||||
{
|
||||
public:
|
||||
SLATE_BEGIN_ARGS(STobiiWelcomeWindow)
|
||||
{
|
||||
}
|
||||
SLATE_END_ARGS()
|
||||
|
||||
STobiiWelcomeWindow() {}
|
||||
|
||||
/** Widget constructor */
|
||||
void Construct(const FArguments& Args);
|
||||
|
||||
private:
|
||||
TSharedPtr<SWebBrowser> MainBrowser;
|
||||
bool bDontShowAgain;
|
||||
|
||||
void UpdateFlag();
|
||||
FReply ShowDesktopSamples();
|
||||
FReply ShowXRSamples();
|
||||
FReply AbortTutorial();
|
||||
};
|
||||
|
||||
#endif //WITH_EDITOR
|
||||
88
Source/TobiiCore/Private/UserGuide/TobiiEditorExtension.cpp
Normal file
88
Source/TobiiCore/Private/UserGuide/TobiiEditorExtension.cpp
Normal file
@@ -0,0 +1,88 @@
|
||||
/******************************************************************************
|
||||
* Copyright 2017- Tobii Technology AB. All rights reserved.
|
||||
*
|
||||
* @author Temaran | Fredrik Lindh | fredrik.lindh@tobii.com | https://github.com/Temaran
|
||||
******************************************************************************/
|
||||
|
||||
#if WITH_EDITOR
|
||||
|
||||
#include "TobiiEditorExtension.h"
|
||||
#include "STobiiLicenseWindow.h"
|
||||
|
||||
#include "RHI.h"
|
||||
#include "Editor.h"
|
||||
#include "Modules/ModuleManager.h"
|
||||
#include "Framework/Application/SlateApplication.h"
|
||||
|
||||
FTobiiEditorExtension::FTobiiEditorExtension(FTobiiCoreModule* InCoreModule)
|
||||
: CoreModule(InCoreModule)
|
||||
, bIsEditorInitialized(false)
|
||||
{
|
||||
// Defer Level Editor UI extensions until Level Editor has been loaded:
|
||||
if (FModuleManager::Get().IsModuleLoaded("LevelEditor"))
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
else
|
||||
{
|
||||
FModuleManager::Get().OnModulesChanged().AddLambda([this](FName name, EModuleChangeReason reason)
|
||||
{
|
||||
if ((name == "LevelEditor") && (reason == EModuleChangeReason::ModuleLoaded))
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
FTobiiEditorExtension::~FTobiiEditorExtension()
|
||||
{
|
||||
}
|
||||
|
||||
void FTobiiEditorExtension::Initialize()
|
||||
{
|
||||
if (GUsingNullRHI)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
FSlateRenderer* SlateRenderer = FSlateApplication::Get().GetRenderer();
|
||||
if (SlateRenderer != nullptr)
|
||||
{
|
||||
LoadedDelegateHandle = SlateRenderer->OnSlateWindowRendered().AddRaw(this, &FTobiiEditorExtension::OnEditorLoaded);
|
||||
}
|
||||
}
|
||||
|
||||
void FTobiiEditorExtension::OnEditorLoaded(SWindow& SlateWindow, void* ViewportRHIPtr)
|
||||
{
|
||||
// would be nice to use the preprocessor definition WITH_EDITOR instead,
|
||||
// but the user may launch a standalone game through the editor...
|
||||
if (GEditor == nullptr || CoreModule == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsInGameThread())
|
||||
{
|
||||
FSlateRenderer* SlateRenderer = FSlateApplication::Get().GetRenderer();
|
||||
SlateRenderer->OnSlateWindowRendered().Remove(LoadedDelegateHandle);
|
||||
}
|
||||
|
||||
if (bIsEditorInitialized)
|
||||
{
|
||||
return;
|
||||
}
|
||||
bIsEditorInitialized = true;
|
||||
|
||||
if (GConfig != nullptr)
|
||||
{
|
||||
bool bTobiiLicenseAccepted(false);
|
||||
GConfig->GetBool(TEXT("Tobii"), TEXT("TobiiLicenseAccepted"), bTobiiLicenseAccepted, GGameIni);
|
||||
if (!bTobiiLicenseAccepted && GEditor != nullptr)
|
||||
{
|
||||
FSlateApplication::Get().AddWindow(SNew(STobiiLicenseWindow, CoreModule));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif //WITH_EDITOR
|
||||
30
Source/TobiiCore/Private/UserGuide/TobiiEditorExtension.h
Normal file
30
Source/TobiiCore/Private/UserGuide/TobiiEditorExtension.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/******************************************************************************
|
||||
* Copyright 2017- Tobii Technology AB. All rights reserved.
|
||||
*
|
||||
* @author Temaran | Fredrik Lindh | fredrik.lindh@tobii.com | https://github.com/Temaran
|
||||
******************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if WITH_EDITOR
|
||||
|
||||
#include "../TobiiCoreModule.h"
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
|
||||
class FTobiiEditorExtension
|
||||
{
|
||||
public:
|
||||
FTobiiEditorExtension(FTobiiCoreModule* InCoreModule);
|
||||
~FTobiiEditorExtension();
|
||||
void Initialize();
|
||||
|
||||
private:
|
||||
FTobiiCoreModule* CoreModule;
|
||||
FDelegateHandle LoadedDelegateHandle;
|
||||
bool bIsEditorInitialized;
|
||||
|
||||
void OnEditorLoaded(SWindow& SlateWindow, void* ViewportRHIPtr);
|
||||
};
|
||||
|
||||
#endif //WITH_EDITOR
|
||||
Reference in New Issue
Block a user