2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-09-09 12:16:36 -04:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "HardwareTargetingSettings.generated.h"
|
|
|
|
|
|
|
|
|
|
/** Enum specifying a class of hardware */
|
|
|
|
|
UENUM()
|
|
|
|
|
namespace EHardwareClass
|
|
|
|
|
{
|
|
|
|
|
enum Type
|
|
|
|
|
{
|
2015-06-10 12:54:31 -04:00
|
|
|
/** Unspecified, meaning no choice has been made yet */
|
2014-09-30 12:18:05 -04:00
|
|
|
Unspecified,
|
|
|
|
|
|
2015-06-10 12:54:31 -04:00
|
|
|
/** Desktop or console */
|
2014-09-25 22:44:16 -04:00
|
|
|
Desktop,
|
|
|
|
|
|
2015-06-10 12:54:31 -04:00
|
|
|
/** Mobile or tablet */
|
2014-09-25 22:44:16 -04:00
|
|
|
Mobile
|
2014-09-09 12:16:36 -04:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Enum specifying a graphics preset preference */
|
|
|
|
|
UENUM()
|
|
|
|
|
namespace EGraphicsPreset
|
|
|
|
|
{
|
|
|
|
|
enum Type
|
|
|
|
|
{
|
2015-06-10 12:54:31 -04:00
|
|
|
/** Unspecified, meaning no choice has been made yet */
|
2014-09-30 12:18:05 -04:00
|
|
|
Unspecified,
|
|
|
|
|
|
2015-06-10 12:54:31 -04:00
|
|
|
/** Maximum quality - High-end features default to enabled */
|
2014-09-25 22:44:16 -04:00
|
|
|
Maximum,
|
|
|
|
|
|
2015-06-10 12:54:31 -04:00
|
|
|
/** Scalable quality - Some features are disabled by default but can be enabled based on the actual hardware */
|
2014-09-25 22:44:16 -04:00
|
|
|
Scalable
|
2014-09-09 12:16:36 -04:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Hardware targeting settings, stored in default config, per-project */
|
2014-10-01 05:58:03 -04:00
|
|
|
UCLASS(config=Engine, defaultconfig)
|
2014-09-25 22:44:16 -04:00
|
|
|
class HARDWARETARGETING_API UHardwareTargetingSettings : public UObject
|
2014-09-09 12:16:36 -04:00
|
|
|
{
|
2015-03-17 05:38:32 -04:00
|
|
|
GENERATED_UCLASS_BODY()
|
2014-09-09 12:16:36 -04:00
|
|
|
|
|
|
|
|
/** Enum specifying which class of hardware this game is targeting */
|
|
|
|
|
UPROPERTY(config, EditAnywhere, category=None)
|
|
|
|
|
TEnumAsByte<EHardwareClass::Type> TargetedHardwareClass;
|
2014-10-01 05:58:03 -04:00
|
|
|
|
|
|
|
|
/** Enum that is set to TargetedHardwareClass when the settings have been successfully applied */
|
|
|
|
|
UPROPERTY(config)
|
|
|
|
|
TEnumAsByte<EHardwareClass::Type> AppliedTargetedHardwareClass;
|
2014-09-09 12:16:36 -04:00
|
|
|
|
|
|
|
|
/** Enum specifying a graphics preset to use for this game */
|
|
|
|
|
UPROPERTY(config, EditAnywhere, category=None)
|
|
|
|
|
TEnumAsByte<EGraphicsPreset::Type> DefaultGraphicsPerformance;
|
|
|
|
|
|
2014-10-01 05:58:03 -04:00
|
|
|
/** Enum that is set to DefaultGraphicsPerformance when the settings have been successfully applied */
|
|
|
|
|
UPROPERTY(config)
|
|
|
|
|
TEnumAsByte<EGraphicsPreset::Type> AppliedDefaultGraphicsPerformance;
|
|
|
|
|
|
2014-09-09 12:16:36 -04:00
|
|
|
/** Check if these settings have any pending changes that require action */
|
|
|
|
|
bool HasPendingChanges() const;
|
2014-09-18 22:10:53 -04:00
|
|
|
|
|
|
|
|
#if WITH_EDITOR
|
|
|
|
|
public:
|
|
|
|
|
/** Returns an event delegate that is executed when a setting has changed. */
|
|
|
|
|
DECLARE_EVENT(UHardwareTargetingSettings, FSettingChangedEvent);
|
|
|
|
|
FSettingChangedEvent& OnSettingChanged( ) { return SettingChangedEvent; }
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
/** Called when a property on this object is changed */
|
|
|
|
|
virtual void PostEditChangeProperty( struct FPropertyChangedEvent& PropertyChangedEvent ) override;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
/** Holds an event delegate that is executed when a setting has changed. */
|
|
|
|
|
FSettingChangedEvent SettingChangedEvent;
|
|
|
|
|
#endif
|
2015-03-17 05:38:32 -04:00
|
|
|
};
|