Arma Reforger Script API
|
Static Public Member Functions | |
static string | FloatToStringNoZeroDecimalEndings (float value, int lenDec) |
Returns a float with set decimal length that will remove any ending zeroes in the decimal values. | |
static string | FormatDateTime (int year, int month, int day, int hour, int minute, int second) |
static string | FormatDate (int year, int month, int day) |
static string | FormatTime (int totalSeconds) |
static string | FormatTime (int hour, int minute, int second) |
static string | GetTimeFormatting (int days, int hours, int minutes, int seconds, ETimeFormatParam hideEmpty=0, ETimeFormatParam hideLeadingZeroes=0) |
Depending on the flags given it will return a variation on dd:hh:mm:ss and d:h:m:s. | |
static string | GetTimeFormatting (int totalSeconds, ETimeFormatParam hideEmpty=0, ETimeFormatParam hideLeadingZeroes=0) |
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). | |
static string | GetTimeFormattingHideSeconds (int totalSeconds, ETimeFormatParam hideEmpty=0, ETimeFormatParam hideLeadingZeroes=0) |
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). | |
static string | GetTimeFormattingHoursMinutes (int hours, int minutes, ETimeFormatParam hideEmpty=0, ETimeFormatParam hideLeadingZeroes=0) |
Returns a variant of hh:mm and h:m. | |
static string | GetTimeFormattingMinutesSeconds (int minutes, int seconds, ETimeFormatParam hideEmpty=0, ETimeFormatParam hideLeadingZeroes=0) |
Returns a variant of mm:ss and m:s. | |
static string | GetTimeSinceEventImprecise (int timeDiffSeconds) |
static string | FormatFrequencies (notnull set< int > frequencies, set< int > highlightFrequencies=null) |
Format the list of frequencies as single-line text. | |
Static Protected Member Functions | |
static string | ReturnTimeTypeString (int prevTimeTypeAmount, int currentTimeTypeAmount, int numberLength) |
Always have number length 1 then check if ETimeFormatParam (for example) SECONDS is given is true (aka 1) or not (aka 0) | |
static string | GetTimeSinceEventString (int amount, string oneUnit, string manyUnits) |
Helps with time formatting - returns "0 minutes", "3 minutes", but "1 minute". | |
|
static |
Returns a float with set decimal length that will remove any ending zeroes in the decimal values.
[in] | value | The float value to get the string from |
[in] | lenDec | Length of decimals to show. Zeroes of course are not counted return Converted float into a string with decimals without ending zeroes |
|
static |
[in] | year | can be < 100, if so 2000 will be added (86 = 2086, NOT 1986) |
[in] | month | |
[in] | day |
|
static |
[in] | year | |
[in] | month | |
[in] | day | |
[in] | hour | |
[in] | minute | |
[in] | second |
|
static |
Format the list of frequencies as single-line text.
[in] | frequencies | List of frequencies |
|
static |
[in] | hour | |
[in] | minute | |
[in] | second |
|
static |
[in] | totalSeconds |
|
static |
Depending on the flags given it will return a variation on dd:hh:mm:ss and d:h:m:s.
Time variables that are -1 will always be hidden (So without days it would look: hh:mm:ss) Usage: SCR_FormatHelper.GetTimeFormatting(0, 13, 37, 0, ETimeFormatParam.DAYS | ETimeFormatParam.HOURS, ETimeFormatParam.MINUTES). Hide Days and Hours if 0, Never show leading 0 for minutes
[in] | days | Int amount of days |
[in] | hours | Int amount of hours |
[in] | minutes | Int amount of minutes |
[in] | seconds | Int amount of seconds |
[in] | hideEmpty | flag time that needs to be hidden if zero (Example: ETimeFormatParam.DAYS hides days if 0 or less) |
[in] | hideLeadingZeroes | flag that hides leading zero for Hours, Minutes and Seconds (Example: ETimeFormatParam.HOURS displays h:mm:ss instead of hh:mm:ss) |
|
static |
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
[in] | totalSeconds | Int total amount of seconds to be converted to dd:hh:mm:ss |
[in] | hideEmpty | flag time that needs to be hidden if zero (Example: ETimeFormatParam.DAYS hides days if 0 or less) |
[in] | hideLeadingZeroes | flag that hides leading zero for Hours, Minutes and Seconds (Example: ETimeFormatParam.HOURS displays h:mm:ss instead of hh:mm:ss) |
|
static |
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
[in] | totalSeconds | Int total amount of seconds to be converted to dd:hh:mm |
[in] | hideEmpty | flag time that needs to be hidden if zero (Example: ETimeFormatParam.DAYS hides days if 0 or less) |
[in] | hideLeadingZeroes | flag that hides leading zero for Hours, Minutes and Seconds (Example: ETimeFormatParam.HOURS displays h:mm instead of hh:mm) |
|
static |
Returns a variant of hh:mm and h:m.
[in] | hours | Int amount of hours |
[in] | minutes | Int amount of minutes |
[in] | hideEmpty | flag time that needs to be hidden if zero (Example: ETimeFormatParam.HOURS hides hours if 0 or less) |
[in] | hideLeadingZeroes | flag that hides leading zero (Example: ETimeFormatParam.HOURS displays h:mm instead of hh:mm) |
|
static |
Returns a variant of mm:ss and m:s.
[in] | minutes | Int amount of minutes |
[in] | seconds | Int amount of seconds |
[in] | hideEmpty | flag time that needs to be hidden if zero (Example: ETimeFormatParam.MINUTES hides minutes if 0 or less) |
[in] | hideLeadingZeroes | flag that hides leading zero (Example: ETimeFormatParam.MINUTES displays m:ss instead of mm:ss) |
|
static |
[in] | timeDiffSeconds |
|
staticprotected |
Helps with time formatting - returns "0 minutes", "3 minutes", but "1 minute".
[in] | amount | |
[in] | oneUnit | |
[in] | manyUnits |
|
staticprotected |
Always have number length 1 then check if ETimeFormatParam (for example) SECONDS is given is true (aka 1) or not (aka 0)
[in] | prevTimeTypeAmount | |
[in] | currentTimeTypeAmount | |
[in] | numberLength | checks if should have leading zero |