Merge pull request #8174 from abcdefg30/formattime
Added a FormatTime function to UtilsGlobal.cs
This commit is contained in:
@@ -12,6 +12,7 @@ using System.Linq;
|
|||||||
using Eluant;
|
using Eluant;
|
||||||
using OpenRA.Scripting;
|
using OpenRA.Scripting;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
using OpenRA.Widgets;
|
||||||
|
|
||||||
namespace OpenRA.Mods.Common.Scripting
|
namespace OpenRA.Mods.Common.Scripting
|
||||||
{
|
{
|
||||||
@@ -96,5 +97,11 @@ namespace OpenRA.Mods.Common.Scripting
|
|||||||
|
|
||||||
return Context.World.SharedRandom.Next(low, high);
|
return Context.World.SharedRandom.Next(low, high);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Desc("Returns the ticks formatted to HH:MM:SS.")]
|
||||||
|
public string FormatTime(int ticks, bool leadingMinuteZero = true)
|
||||||
|
{
|
||||||
|
return WidgetUtils.FormatTime(ticks, leadingMinuteZero);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -275,10 +275,10 @@ Actors:
|
|||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
Actor77: v31
|
Actor77: v31
|
||||||
Location: 10,52
|
Location: 10,52
|
||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
Actor87: v23
|
Actor87: v23
|
||||||
Location: 9,59
|
Location: 9,59
|
||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
Actor92: jeep
|
Actor92: jeep
|
||||||
Location: 51,25
|
Location: 51,25
|
||||||
Owner: GDI
|
Owner: GDI
|
||||||
@@ -288,7 +288,7 @@ Actors:
|
|||||||
Actor94: jeep
|
Actor94: jeep
|
||||||
Location: 39,48
|
Location: 39,48
|
||||||
Owner: GDI
|
Owner: GDI
|
||||||
Facing: 96
|
Facing: 96
|
||||||
Actor110: e1
|
Actor110: e1
|
||||||
Location: 40,49
|
Location: 40,49
|
||||||
Owner: GDI
|
Owner: GDI
|
||||||
@@ -311,7 +311,7 @@ Actors:
|
|||||||
Actor114: e2
|
Actor114: e2
|
||||||
Location: 35,40
|
Location: 35,40
|
||||||
Owner: GDI
|
Owner: GDI
|
||||||
SubCell: 1
|
SubCell: 1
|
||||||
waypoint27: waypoint
|
waypoint27: waypoint
|
||||||
Location: 31,36
|
Location: 31,36
|
||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
@@ -492,7 +492,7 @@ Actors:
|
|||||||
CameraPoint: waypoint
|
CameraPoint: waypoint
|
||||||
Location: 32,22
|
Location: 32,22
|
||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
|
|
||||||
Smudges:
|
Smudges:
|
||||||
|
|
||||||
Rules:
|
Rules:
|
||||||
@@ -508,7 +508,7 @@ Rules:
|
|||||||
ObjectivesPanel:
|
ObjectivesPanel:
|
||||||
PanelName: MISSION_OBJECTIVES
|
PanelName: MISSION_OBJECTIVES
|
||||||
LuaScript:
|
LuaScript:
|
||||||
Scripts: nod04b.lua
|
Scripts: nod04b.lua
|
||||||
^Vehicle:
|
^Vehicle:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
GenericVisibility: Enemy
|
GenericVisibility: Enemy
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Container@SKIRMISH_STATS:
|
Container@SKIRMISH_STATS:
|
||||||
Height: PARENT_BOTTOM
|
Height: PARENT_BOTTOM
|
||||||
Width: PARENT_RIGHT
|
Width: PARENT_RIGHT
|
||||||
Logic: GameInfoStatsLogic
|
Logic: GameInfoStatsLogic
|
||||||
Children:
|
Children:
|
||||||
|
|||||||
Reference in New Issue
Block a user