// Oleg Petruny staff

#pragma once

#include "Engine/DeveloperSettings.h"
#include "InputCoreTypes.h"
#include "CoreMinimal.h"
#include "Settings.generated.h"


UCLASS(Config = Settings, defaultconfig)
class LOST_EDGE_API USettings : public UDeveloperSettings {
	GENERATED_BODY()
public:
	virtual FName GetContainerName() const override { return(Super::GetContainerName()); }
	virtual FName GetCategoryName() const override { return("In Game Settings"); }
	virtual FName GetSectionName() const override { return(Super::GetSectionName()); }

#if WITH_EDITOR
	virtual FText GetSectionText() const override { return(FText::FromString(TEXT("All settings"))); }
	virtual FText GetSectionDescription() const override { return(FText::FromString(TEXT("All settings can finded in options menus"))); }
#endif

private:

protected:
	/*		OTHER		*/
	UPROPERTY(GlobalConfig, EditAnywhere)
		bool reinit;

	/*		VIDEO		*/
	UPROPERTY(GlobalConfig, EditAnywhere)
		int monitor;
	UPROPERTY(GlobalConfig, EditAnywhere)
		int width;
	UPROPERTY(GlobalConfig, EditAnywhere)
		int height;
	UPROPERTY(GlobalConfig, EditAnywhere)
		int mode;
	UPROPERTY(GlobalConfig, EditAnywhere)
		float scale;
	UPROPERTY(GlobalConfig, EditAnywhere)
		float brightness;
	UPROPERTY(GlobalConfig, EditAnywhere)
		float blur;
	UPROPERTY(GlobalConfig, EditAnywhere)
		bool fps;

	UPROPERTY(GlobalConfig, EditAnywhere)
		int dmonitor;
	UPROPERTY(GlobalConfig, EditAnywhere)
		int dwidth;
	UPROPERTY(GlobalConfig, EditAnywhere)
		int dheight;
	UPROPERTY(GlobalConfig, EditAnywhere)
		int dmode;
	UPROPERTY(GlobalConfig, EditAnywhere)
		float dscale;
	UPROPERTY(GlobalConfig, EditAnywhere)
		float dbrightness;
	UPROPERTY(GlobalConfig, EditAnywhere)
		float dblur;
	UPROPERTY(GlobalConfig, EditAnywhere)
		bool dfps;

	/*		AUDIO		*/
	UPROPERTY(GlobalConfig, EditAnywhere)
		float master;
	UPROPERTY(GlobalConfig, EditAnywhere)
		float music;
	UPROPERTY(GlobalConfig, EditAnywhere)
		float effects;
	UPROPERTY(GlobalConfig, EditAnywhere)
		float voices;
	UPROPERTY(GlobalConfig, EditAnywhere)
		float menu;

	UPROPERTY(GlobalConfig, EditAnywhere)
		float dmaster;
	UPROPERTY(GlobalConfig, EditAnywhere)
		float dmusic;
	UPROPERTY(GlobalConfig, EditAnywhere)
		float deffects;
	UPROPERTY(GlobalConfig, EditAnywhere)
		float dvoices;
	UPROPERTY(GlobalConfig, EditAnywhere)
		float dmenu;

	/*		CONTROLS		*/
	UPROPERTY(GlobalConfig, EditAnywhere)
		float sensetivity;
	UPROPERTY(GlobalConfig, EditAnywhere)
		bool invert;

	UPROPERTY(GlobalConfig, EditAnywhere)
		float dsensetivity;
	UPROPERTY(GlobalConfig, EditAnywhere)
		bool dinvert;
	UPROPERTY(GlobalConfig, EditAnywhere)
		FKey dmoveforwkey;
	UPROPERTY(GlobalConfig, EditAnywhere)
		FKey dmovebackkey;
	UPROPERTY(GlobalConfig, EditAnywhere)
		FKey dmoveleftkey;
	UPROPERTY(GlobalConfig, EditAnywhere)
		FKey dmoverightkey;
	UPROPERTY(GlobalConfig, EditAnywhere)
		FKey drunkey;
	UPROPERTY(GlobalConfig, EditAnywhere)
		FKey djumpkey;
	UPROPERTY(GlobalConfig, EditAnywhere)
		FKey dcrouchkey;
	UPROPERTY(GlobalConfig, EditAnywhere)
		FKey dinteractkey;
	UPROPERTY(GlobalConfig, EditAnywhere)
		FKey dcutskipkey;
	UPROPERTY(GlobalConfig, EditAnywhere)
		FKey ddiaskipkey;
	UPROPERTY(GlobalConfig, EditAnywhere)
		FKey dcammodekey;
	UPROPERTY(GlobalConfig, EditAnywhere)
		FKey dpausekey;

	/*		GAMEPLAY		*/
	UPROPERTY(GlobalConfig, EditAnywhere)
		bool ui;
	UPROPERTY(GlobalConfig, EditAnywhere)
		FString language;
	UPROPERTY(GlobalConfig, EditAnywhere)
		bool subtitles;

	UPROPERTY(GlobalConfig, EditAnywhere)
		bool dui;
	UPROPERTY(GlobalConfig, EditAnywhere)
		FString dlanguage;
	UPROPERTY(GlobalConfig, EditAnywhere)
		bool dsubtitles;

public:

	/*		OTHER		*/
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Other")
		static void SettingsSave();

	UFUNCTION(BlueprintPure, Category = "Settings Config|Other")
		static void SettingsGetReinit(bool &reinitialize);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Other")
		static void SettingsSetReinit(bool reinitialize);

	/*		VIDEO		*/
	UFUNCTION(BlueprintPure, Category = "Settings Config|Video")
		static void SettingsGetMonitorId(int &monitorId);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Video")
		static void SettingsSetMonitorId(int monitorId);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Video")
		static void SettingsGetScreenResolution(FIntPoint &resolution);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Video")
		static void SettingsSetScreenResolution(FIntPoint resolution);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Video")
		static void SettingsGetWindowMode(int &displayMode);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Video")
		static void SettingsSetWindowMode(int displayMode);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Video")
		static void SettingsGetResolutionScale(float &resolutionScale);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Video")
		static void SettingsSetResolutionScale(float resolutionScale);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Video")
		static void SettingsGetBrightnessIntensity(float &brightnessIntensity);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Video")
		static void SettingsSetBrightnessIntensity(float brightnessIntensity);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Video")
		static void SettingsGetMotionBlur(float &motionBlur);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Video")
		static void SettingsSetMotionBlur(float motionBlur);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Video")
		static void SettingsGetShowFps(bool &showFps);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Video")
		static void SettingsSetShowFps(bool showFps);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Video")
		static void SettingsGetDefaultMonitorId(int &monitorId);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Video")
		static void SettingsSetDefaultMonitorId(int monitorId);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Video")
		static void SettingsGetDefaultScreenResolution(FIntPoint &resolution);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Video")
		static void SettingsSetDefaultScreenResolution(FIntPoint resolution);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Video")
		static void SettingsGetDefaultWindowMode(int &displayMode);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Video")
		static void SettingsSetDefaultWindowMode(int displayMode);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Video")
		static void SettingsGetDefaultResolutionScale(float &resolutionScale);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Video")
		static void SettingsGetDefaultBrightnessIntensity(float &brightnessIntensity);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Video")
		static void SettingsGetDefaultMotionBlur(float &motionBlur);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Video")
		static void SettingsGetDefaultShowFps(bool &showFps);

	/*		AUDIO		*/
	UFUNCTION(BlueprintPure, Category = "Settings Config|Audio")
		static void SettingsGetMasterVolume(float &masterVolume);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Audio")
		static void SettingsSetMasterVolume(float masterVolume);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Audio")
		static void SettingsGetMusicVolume(float &musicVolume);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Audio")
		static void SettingsSetMusicVolume(float musicVolume);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Audio")
		static void SettingsGetEffectsVolume(float &effectsVolume);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Audio")
		static void SettingsSetEffectsVolume(float effectsVolume);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Audio")
		static void SettingsGetVoicesVolume(float &voicesVolume);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Audio")
		static void SettingsSetVoicesVolume(float voicesVolume);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Audio")
		static void SettingsGetMenuVolume(float &menuVolume);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Audio")
		static void SettingsSetMenuVolume(float menuVolume);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Audio")
		static void SettingsGetDefaultMasterVolume(float &masterVolume);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Audio")
		static void SettingsGetDefaultMusicVolume(float &musicVolume);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Audio")
		static void SettingsGetDefaultEffectsVolume(float &effectsVolume);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Audio")
		static void SettingsGetDefaultVoicesVolume(float &voicesVolume);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Audio")
		static void SettingsGetDefaultMenuVolume(float &menuVolume);

	/*		CONTROLS		*/
	UFUNCTION(BlueprintPure, Category = "Settings Config|Controls")
		static void SettingsGetSensetivity(float &speed);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Controls")
		static void SettingsSetSensetivity(float speed);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Controls")
		static void SettingsGetInvertEnabled(bool &enabled);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Controls")
		static void SettingsSetInvertEnabled(bool enabled);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Controls")
		static void SettingsGetDefaultSensetivity(float &speed);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Controls")
		static void SettingsGetDefaultInvertEnabled(bool &enabled);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Controls")
		static void SettingsGetDefaultMoveForwardsKey(FKey &key);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Controls")
		static void SettingsGetDefaultMoveBackwardsKey(FKey &key);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Controls")
		static void SettingsGetDefaultMoveLeftKey(FKey &key);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Controls")
		static void SettingsGetDefaultMoveRightKey(FKey &key);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Controls")
		static void SettingsGetDefaultRunKey(FKey &key);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Controls")
		static void SettingsGetDefaultJumpKey(FKey &key);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Controls")
		static void SettingsGetDefaultCrouchKey(FKey &key);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Controls")
		static void SettingsGetDefaultInteractKey(FKey &key);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Controls")
		static void SettingsGetDefaultCutsceneSkipKey(FKey &key);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Controls")
		static void SettingsGetDefaultDialogueSkipKey(FKey &key);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Controls")
		static void SettingsGetDefaultCameraModeKey(FKey &key);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Controls")
		static void SettingsGetDefaultPauseKey(FKey &key);

	/*		GAMEPLAY		*/
	UFUNCTION(BlueprintPure, Category = "Settings Config|Gameplay")
		static void SettingsGetUIEnabled(bool &enabled);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Gameplay")
		static void SettingsSetUIEnabled(bool enabled);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Gameplay")
		static void SettingsGetLanguage(FString &code);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Gameplay")
		static void SettingsSetLanguage(FString code);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Gameplay")
		static void SettingsGetSubtitlesEnabled(bool &enabled);
	UFUNCTION(BlueprintCallable, Category = "Settings Config|Gameplay")
		static void SettingsSetSubtitlesEnabled(bool enabled);

	UFUNCTION(BlueprintPure, Category = "Settings Config|Gameplay")
		static void SettingsGetDefaultUIEnabled(bool &enabled);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Gameplay")
		static void SettingsGetDefaultLanguage(FString &code);
	UFUNCTION(BlueprintPure, Category = "Settings Config|Gameplay")
		static void SettingsGetDefaultSubtitlesEnabled(bool &enabled);
};