Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_FormatHelper Class Reference

Static Protected Member Functions

static string ReturnTimeTypeString (int prevTimeTypeAmount, int currentTimeTypeAmount, int numberLength)
static string GetTimeFormatting (int totalSeconds, ETimeFormatParam hideEmpty=0, ETimeFormatParam hideLeadingZeroes=0)
static string GetTimeFormattingHideSeconds (int totalSeconds, ETimeFormatParam hideEmpty=0, ETimeFormatParam hideLeadingZeroes=0)
static string GetTimeFormattingHoursMinutes (int hours, int minutes, ETimeFormatParam hideEmpty=0, ETimeFormatParam hideLeadingZeroes=0)
static string GetTimeFormattingMinutesSeconds (int minutes, int seconds, ETimeFormatParam hideEmpty=0, ETimeFormatParam hideLeadingZeroes=0)
static string GetTimeSinceEventString (int amount, string oneUnit, string manyUnits)
static string GetTimeSinceEventImprecise (int timeDiffSeconds)
static string FormatFrequencies (notnull set< int > frequencies, set< int > highlightFrequencies=null)

Detailed Description

Definition at line 1 of file SCR_FormatHelper.c.

Member Function Documentation

◆ FormatFrequencies()

string SCR_FormatHelper::FormatFrequencies ( notnull set< int > frequencies,
set< int > highlightFrequencies = null )
inlinestaticprotected

Format the list of frequencies as single-line text.

Parameters
[in]frequenciesList of frequencies
Returns
Text with frequencies

Definition at line 274 of file SCR_FormatHelper.c.

◆ GetTimeFormatting()

string SCR_FormatHelper::GetTimeFormatting ( int totalSeconds,
ETimeFormatParam hideEmpty = 0,
ETimeFormatParam hideLeadingZeroes = 0 )
inlinestaticprotected

Combines GetTimeFormatting() and SCR_DateTimeHelper.GetDayHourMinuteSecondFromSeconds() It is possible to hide a time varriable like days using the hide bool when it is 0 or less Usage: SCR_FormatHelper.GetTimeFormatting(totalSeconds, ETimeFormatParam.DAYS | ETimeFormatParam.HOURS, ETimeFormatParam.MINUTES). Hide Days and Hours if 0, Never show leading 0 for minutes

Parameters
[in]totalSecondsInt total amount of seconds to be converted to dd:hh:mm:ss
[in]hideEmptyflag time that needs to be hidden if zero (Example: ETimeFormatParam.DAYS hides days if 0 or less)
[in]hideLeadingZeroesflag that hides leading zero for Hours, Minutes and Seconds (Example: ETimeFormatParam.HOURS displays h:mm:ss instead of hh:mm:ss)
Returns
string Time ordered in days, hours, minutes and seconds (dd:hh:mm:ss)

Definition at line 191 of file SCR_FormatHelper.c.

◆ GetTimeFormattingHideSeconds()

string SCR_FormatHelper::GetTimeFormattingHideSeconds ( int totalSeconds,
ETimeFormatParam hideEmpty = 0,
ETimeFormatParam hideLeadingZeroes = 0 )
inlinestaticprotected

Combines GetTimeFormatting() and SCR_DateTimeHelper.GetDayHourMinuteSecondFromSeconds() while hiding seconds It is possible to hide a time varriable like days using the hide bool when it is 0 or less Usage: SCR_FormatHelper.GetTimeFormatting(totalSeconds, ETimeFormatParam.DAYS | ETimeFormatParam.HOURS, ETimeFormatParam.MINUTES). Hide Days and Hours if 0, Never show leading 0 for minutes

Parameters
[in]totalSecondsInt total amount of seconds to be converted to dd:hh:mm
[in]hideEmptyflag time that needs to be hidden if zero (Example: ETimeFormatParam.DAYS hides days if 0 or less)
[in]hideLeadingZeroesflag that hides leading zero for Hours, Minutes and Seconds (Example: ETimeFormatParam.HOURS displays h:mm instead of hh:mm)
Returns
string Time ordered in days, hours and minutes (dd:hh:mm)

Definition at line 206 of file SCR_FormatHelper.c.

◆ GetTimeFormattingHoursMinutes()

string SCR_FormatHelper::GetTimeFormattingHoursMinutes ( int hours,
int minutes,
ETimeFormatParam hideEmpty = 0,
ETimeFormatParam hideLeadingZeroes = 0 )
inlinestaticprotected

Returns a variant of hh:mm and h:m

Parameters
[in]hoursInt amount of hours
[in]minutesInt amount of minutes
[in]hideEmptyflag time that needs to be hidden if zero (Example: ETimeFormatParam.HOURS hides hours if 0 or less)
[in]hideLeadingZeroesflag that hides leading zero (Example: ETimeFormatParam.HOURS displays h:mm instead of hh:mm)
Returns
string Time ordered in hours and minutes (hh:mm)

Definition at line 220 of file SCR_FormatHelper.c.

◆ GetTimeFormattingMinutesSeconds()

string SCR_FormatHelper::GetTimeFormattingMinutesSeconds ( int minutes,
int seconds,
ETimeFormatParam hideEmpty = 0,
ETimeFormatParam hideLeadingZeroes = 0 )
inlinestaticprotected

Returns a variant of mm:ss and m:s

Parameters
[in]minutesInt amount of minutes
[in]secondsInt amount of seconds
[in]hideEmptyflag time that needs to be hidden if zero (Example: ETimeFormatParam.MINUTES hides minutes if 0 or less)
[in]hideLeadingZeroesflag that hides leading zero (Example: ETimeFormatParam.MINUTES displays m:ss instead of mm:ss)
Returns
string Time ordered in minutes and hours (mm:ss)

Definition at line 232 of file SCR_FormatHelper.c.

◆ GetTimeSinceEventImprecise()

string SCR_FormatHelper::GetTimeSinceEventImprecise ( int timeDiffSeconds)
inlinestaticprotected
Parameters
[in]timeDiffSeconds
Returns
translation text of how much time has passed since event: "23 days ago", or "23 hours ago", or "23 minutes ago". When timeDiffSeconds is below 60, it returns "0 minutes ago".

Definition at line 254 of file SCR_FormatHelper.c.

◆ GetTimeSinceEventString()

string SCR_FormatHelper::GetTimeSinceEventString ( int amount,
string oneUnit,
string manyUnits )
inlinestaticprotected

Helps with time formatting - returns "0 minutes", "3 minutes", but "1 minute".

Parameters
[in]amount
[in]oneUnit
[in]manyUnits

Definition at line 242 of file SCR_FormatHelper.c.

◆ ReturnTimeTypeString()

string SCR_FormatHelper::ReturnTimeTypeString ( int prevTimeTypeAmount,
int currentTimeTypeAmount,
int numberLength )
inlinestaticprotected

Always have number length 1 then check if ETimeFormatParam (for example) SECONDS is given is true (aka 1) or not (aka 0)

Parameters
[in]prevTimeTypeAmount
[in]currentTimeTypeAmount
[in]numberLengthchecks if should have leading zero
Returns
proper formatting of TimeType

Definition at line 175 of file SCR_FormatHelper.c.


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