Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FUnitSettings Class Reference

#include <UnitConversion.h>

+ Collaboration diagram for FUnitSettings:

Public Member Functions

 FUnitSettings ()
 
bool ShouldDisplayUnits () const
 
void SetShouldDisplayUnits (bool bInGlobalUnitDisplay)
 
const TArray< EUnit > & GetDisplayUnits (EUnitType InType) const
 
void SetDisplayUnits (EUnitType InType, const TArray< EUnit > &Units)
 
void SetDisplayUnits (EUnitType InType, EUnit Units)
 
 DECLARE_EVENT (FUnitSettings, FDisplaySettingChanged)
 
FDisplaySettingChangedOnDisplaySettingsChanged ()
 

Private Attributes

bool bGlobalUnitDisplay
 
TArray< EUnitDisplayUnits [(uint8) EUnitType::NumberOf+1]
 
FDisplaySettingChanged SettingChangedEvent
 

Detailed Description

Unit settings accessed globally through FUnitConversion::Settings()

Definition at line 75 of file UnitConversion.h.

Constructor & Destructor Documentation

◆ FUnitSettings()

FUnitSettings::FUnitSettings ( )

Member Function Documentation

◆ DECLARE_EVENT()

FUnitSettings::DECLARE_EVENT ( FUnitSettings ,
FDisplaySettingChanged  )

Returns an event delegate that is executed when a display setting has changed. (GlobalUnitDisplay or DefaultInputUnits)

◆ GetDisplayUnits()

const TArray< EUnit > & FUnitSettings::GetDisplayUnits ( EUnitType InType) const

Get/Set the specific valid units to display the specified type of unit in

◆ OnDisplaySettingsChanged()

FDisplaySettingChanged & FUnitSettings::OnDisplaySettingsChanged ( )
inline

Definition at line 92 of file UnitConversion.h.

◆ SetDisplayUnits() [1/2]

void FUnitSettings::SetDisplayUnits ( EUnitType InType,
const TArray< EUnit > & Units )

◆ SetDisplayUnits() [2/2]

void FUnitSettings::SetDisplayUnits ( EUnitType InType,
EUnit Units )

◆ SetShouldDisplayUnits()

void FUnitSettings::SetShouldDisplayUnits ( bool bInGlobalUnitDisplay)

◆ ShouldDisplayUnits()

bool FUnitSettings::ShouldDisplayUnits ( ) const

Check whether unit display is globally enabled or disabled

Member Data Documentation

◆ bGlobalUnitDisplay

bool FUnitSettings::bGlobalUnitDisplay
private

Global toggle controlling whether we should display units or not

Definition at line 97 of file UnitConversion.h.

◆ DisplayUnits

TArray<EUnit> FUnitSettings::DisplayUnits[(uint8) EUnitType::NumberOf+1]
private

Arrays of units that are valid to display on interfaces

Definition at line 100 of file UnitConversion.h.

◆ SettingChangedEvent

FDisplaySettingChanged FUnitSettings::SettingChangedEvent
private

Holds an event delegate that is executed when a display setting has changed.

Definition at line 103 of file UnitConversion.h.


The documentation for this class was generated from the following file: