Arma Reforger Script API
|
Static Public Member Functions | |
static string | FloatToStringNoZeroDecimalEndings (float value, int lenDec) |
Returns a float with set decimal lenght 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) |
Returns text of how much time has passed since event: "23 days ago", or "23 hours ago", or "23 minutes ago". | |
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) |
Returns proper formatting of TimeType 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 lenght that will remove any ending zeroes in the decimal values.
value | The float value to get the string from |
lenDec | Lenght of decimals to show. Zeroes of course are not counted return Converted float into a string with decimals without ending zeroes |
|
static |
year | can be < 100, if so 2000 will be added (86 = 2086, NOT 1986) |
|
static |
|
static |
Format the list of frequencies as single-line text.
frequencies | List of frequencies |
|
static |
|
static |
|
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
days | Int amount of days |
hours | Int amount of hours |
minutes | Int amount of minutes |
seconds | Int amount of seconds |
hideEmpty | flag time that needs to be hidden if zero (Example: ETimeFormatParam.DAYS hides days if 0 or less) |
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
totalSeconds | Int total amount of seconds to be converted to dd:hh:mm:ss |
hideEmpty | flag time that needs to be hidden if zero (Example: ETimeFormatParam.DAYS hides days if 0 or less) |
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
totalSeconds | Int total amount of seconds to be converted to dd:hh:mm |
hideEmpty | flag time that needs to be hidden if zero (Example: ETimeFormatParam.DAYS hides days if 0 or less) |
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.
hours | Int amount of hours |
minutes | Int amount of minutes |
hideEmpty | flag time that needs to be hidden if zero (Example: ETimeFormatParam.HOURS hides hours if 0 or less) |
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.
minutes | Int amount of minutes |
seconds | Int amount of seconds |
hideEmpty | flag time that needs to be hidden if zero (Example: ETimeFormatParam.MINUTES hides minutes if 0 or less) |
hideLeadingZeroes | flag that hides leading zero (Example: ETimeFormatParam.MINUTES displays m:ss instead of mm:ss) |
|
static |
Returns 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".
|
staticprotected |
Helps with time formatting - returns "0 minutes", "3 minutes", but "1 minute".
|
staticprotected |
Returns proper formatting of TimeType Always have number length 1 then check if ETimeFormatParam (for example) SECONDS is given is true (aka 1) or not (aka 0)
numberLength | checks if should have leading zero |