Skip to content

Commit

Permalink
Improved Countdown support
Browse files Browse the repository at this point in the history
  • Loading branch information
DezLife authored and MrBlue committed Jul 31, 2024
1 parent 2f0433e commit be762f4
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions src/RustCui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -403,19 +403,42 @@ public class CuiCountdownComponent : ICuiComponent
public string Type => "Countdown";

[JsonProperty("endTime")]
public int EndTime { get; set; }
public float EndTime { get; set; }

[JsonProperty("startTime")]
public int StartTime { get; set; }
public float StartTime { get; set; }

[JsonProperty("step")]
public int Step { get; set; }
public float Step { get; set; }

[JsonProperty("interval")]
public float Interval { get; set; }

[JsonConverter(typeof(StringEnumConverter))]
[JsonProperty("timerFormat")]
public TimerFormatEnum TimerFormat { get; set; }

[JsonProperty("numberFormat")]
public string NumberFormat { get; set; }

[JsonProperty("destroyIfDone")]
public bool DestroyIfDone { get; set; }

[JsonProperty("command")]
public string Command { get; set; }

[JsonProperty("fadeIn")]
public float FadeIn { get; set; }

public enum TimerFormatEnum
{
None,
SecondsHundreth,
MinutesSeconds,
MinutesSecondsHundreth,
HoursMinutes,
HoursMinutesSeconds
}
}

public class CuiNeedsCursorComponent : ICuiComponent
Expand Down

0 comments on commit be762f4

Please sign in to comment.