Menu #8

Merged
oleg.petruny merged 9 commits from Menu into master 2025-01-13 18:54:47 +00:00
38 changed files with 119 additions and 63 deletions
Showing only changes of commit fbd5dddcc9 - Show all commits

Binary file not shown.

View File

@ -2,14 +2,16 @@
using UnrealBuildTool;
public class Lost_Edge : ModuleRules {
public Lost_Edge(ReadOnlyTargetRules Target) : base(Target) {
public class Lost_Edge : ModuleRules
{
public Lost_Edge(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OpenCV" });
PrivateDependencyModuleNames.AddRange(new string[] { "EnhancedInput", "UMG", "RHI", "RenderCore", "Lost_EdgeShaders", "PakFile", //"TextureCompressor",
"LevelSequence", "MovieScene", "HTTP", "Json" }); // "Slate", "SlateCore"
"LevelSequence", "MovieScene", "HTTP", "Json", "ApplicationCore" }); // "Slate", "SlateCore"
// UE_LOG(LogTemp, Log, TEXT("capture: %s"), (capture ? TEXT("true") : TEXT("false")));
// GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Yellow, TEXT("1"));

View File

@ -0,0 +1,37 @@
// Oleg Petruny proprietary.
#include "GraphicsSettingsHelper.h"
#include "GenericPlatform/GenericApplication.h"
int32 UGraphicsSettingsHelper::GetPrimaryMonitorId()
{
FDisplayMetrics FDM;
FDisplayMetrics::GetMonitorsInfo(FDM);
TArray<FMonitorInfo> buffer;
for(const FMonitorInfo& i : FDM.MonitorInfo)
{
buffer.Add(FMonitorInfo(i.Name, i.ID, i.NativeWidth, i.NativeHeight,
FPlatformRectangle(i.DisplayRect.Left, i.DisplayRect.Top, i.DisplayRect.Right, i.DisplayRect.Bottom),
FPlatformRectangle(i.WorkArea.Left, i.WorkArea.Top, i.WorkArea.Right, i.WorkArea.Bottom),
i.bIsPrimary, i.DPI));
}
monitors = buffer;
TArray<FMonitorInfo> monitors = GetAvailableMonitors();
for(int i = 0; i < monitors.Num(); i++)
if(monitors[i].bIsPrimary)
return i;
}
int32 UGraphicsSettingsHelper::GetCurrentMonitorId()
{
return int32();
}
//TArray<FMonitorInfo> UGraphicsSettingsHelper::GetAvailableMonitors()
//{
// return TArray<FMonitorInfo>();
//}
void UGraphicsSettingsHelper::SetMonitor(int32 id)
{}

View File

@ -0,0 +1,23 @@
// Oleg Petruny proprietary.
#pragma once
#include "Kismet/BlueprintFunctionLibrary.h"
#include "GraphicsSettingsHelper.generated.h"
UCLASS()
class UGraphicsSettingsHelper : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintPure, Category = GraphicsSettingsHelper)
static int32 GetPrimaryMonitorId();
UFUNCTION(BlueprintPure, Category = GraphicsSettingsHelper)
static int32 GetCurrentMonitorId();
//UFUNCTION(BlueprintPure, Category = GraphicsSettingsHelper)
//static TArray<FMonitorInfo> GetAvailableMonitors();
UFUNCTION(BlueprintCallable, Category = GraphicsSettingsHelper)
static void SetMonitor(int32 id);
};