Skip to content

Commit 3ee9d1c

Browse files
DezLifeMrBlue
authored andcommitted
Improved Countdown support
1 parent 2f0433e commit 3ee9d1c

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

src/RustCui.cs

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,13 +403,26 @@ public class CuiCountdownComponent : ICuiComponent
403403
public string Type => "Countdown";
404404

405405
[JsonProperty("endTime")]
406-
public int EndTime { get; set; }
406+
public float EndTime { get; set; }
407407

408408
[JsonProperty("startTime")]
409-
public int StartTime { get; set; }
409+
public float StartTime { get; set; }
410410

411411
[JsonProperty("step")]
412-
public int Step { get; set; }
412+
public float Step { get; set; }
413+
414+
[JsonProperty("interval")]
415+
public float Interval { get; set; }
416+
417+
[JsonConverter(typeof(StringEnumConverter))]
418+
[JsonProperty("timerFormat")]
419+
public TimerFormat TimerFormat { get; set; }
420+
421+
[JsonProperty("numberFormat")]
422+
public string NumberFormat { get; set; }
423+
424+
[JsonProperty("destroyIfDone")]
425+
public bool DestroyIfDone { get; set; }
413426

414427
[JsonProperty("command")]
415428
public string Command { get; set; }
@@ -418,6 +431,16 @@ public class CuiCountdownComponent : ICuiComponent
418431
public float FadeIn { get; set; }
419432
}
420433

434+
public enum TimerFormat
435+
{
436+
None,
437+
SecondsHundreth,
438+
MinutesSeconds,
439+
MinutesSecondsHundreth,
440+
HoursMinutes,
441+
HoursMinutesSeconds
442+
}
443+
421444
public class CuiNeedsCursorComponent : ICuiComponent
422445
{
423446
public string Type => "NeedsCursor";

0 commit comments

Comments
 (0)