Created simple User Game Settings class
Signed-off-by: TjgL <lithmoneo@gmail.com>
This commit is contained in:
parent
5097658741
commit
1e22bb0372
@ -78,6 +78,7 @@ FontDPI=72
|
|||||||
[/Script/Engine.Engine]
|
[/Script/Engine.Engine]
|
||||||
+ActiveGameNameRedirects=(OldGameName="TP_Blank",NewGameName="/Script/LegumeMix")
|
+ActiveGameNameRedirects=(OldGameName="TP_Blank",NewGameName="/Script/LegumeMix")
|
||||||
+ActiveGameNameRedirects=(OldGameName="/Script/TP_Blank",NewGameName="/Script/LegumeMix")
|
+ActiveGameNameRedirects=(OldGameName="/Script/TP_Blank",NewGameName="/Script/LegumeMix")
|
||||||
|
GameUserSettingsClassName=/Script/LegumeMix.LMUserSettings
|
||||||
|
|
||||||
[/Script/AndroidFileServerEditor.AndroidFileServerRuntimeSettings]
|
[/Script/AndroidFileServerEditor.AndroidFileServerRuntimeSettings]
|
||||||
bEnablePlugin=True
|
bEnablePlugin=True
|
||||||
|
9
Source/LegumeMix/Private/LMUserSettings.cpp
Normal file
9
Source/LegumeMix/Private/LMUserSettings.cpp
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "LMUserSettings.h"
|
||||||
|
|
||||||
|
ULMUserSettings* ULMUserSettings::GetLegumixUserSettings()
|
||||||
|
{
|
||||||
|
return Cast<ULMUserSettings>(UGameUserSettings::GetGameUserSettings());
|
||||||
|
}
|
@ -14,17 +14,4 @@ class LEGUMEMIX_API ULMSaveGame : public USaveGame
|
|||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Legumix|Graphics")
|
|
||||||
FVector2D ScreenResolution;
|
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Legumix|Audio")
|
|
||||||
int MasterAudio;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Legumix|Audio")
|
|
||||||
int MusicAudio;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Legumix|Audio")
|
|
||||||
int FxAudio;
|
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Legumix|Controls")
|
|
||||||
float MouseSensitivity;
|
|
||||||
};
|
};
|
||||||
|
31
Source/LegumeMix/Public/LMUserSettings.h
Normal file
31
Source/LegumeMix/Public/LMUserSettings.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "GameFramework/GameUserSettings.h"
|
||||||
|
#include "LMUserSettings.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS(Blueprintable)
|
||||||
|
class LEGUMEMIX_API ULMUserSettings : public UGameUserSettings
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Legumix", meta = (Keywords = "Game User Settings, Settings, User Settings"))
|
||||||
|
static ULMUserSettings* GetLegumixUserSettings();
|
||||||
|
|
||||||
|
public:
|
||||||
|
UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category = "Legumix|Audio", meta = (UIMin = 0, ClampMin = 0, UIMax = 10, ClampMax = 10))
|
||||||
|
int MasterAudio = 1.f;
|
||||||
|
UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category = "Legumix|Audio", meta = (UIMin = 0, ClampMin = 0, UIMax = 10, ClampMax = 10))
|
||||||
|
int MusicAudio = 1.f;
|
||||||
|
UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category = "Legumix|Audio", meta = (UIMin = 0, ClampMin = 0, UIMax = 10, ClampMax = 10))
|
||||||
|
int FxAudio = 1.f;
|
||||||
|
|
||||||
|
UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category = "Legumix|Controls", meta = (UIMin = 0, ClampMin = 0, UIMax = 10, ClampMax = 10))
|
||||||
|
float MouseSensitivity = 1.f;
|
||||||
|
};
|
Reference in New Issue
Block a user