mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
AKA Without Godot. Still links against GodotSharp, but this does mean that you can run headless or not from the same binary.
38 lines
922 B
C#
38 lines
922 B
C#
using System;
|
|
|
|
namespace SS14.Client.UserInterface.Controls
|
|
{
|
|
[ControlWrap(typeof(Godot.ProgressBar))]
|
|
public class ProgressBar : Range
|
|
{
|
|
public ProgressBar()
|
|
{
|
|
}
|
|
|
|
public ProgressBar(string name) : base(name)
|
|
{
|
|
}
|
|
|
|
internal ProgressBar(Godot.ProgressBar control) : base(control)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// True if the percentage label on top of the progress bar is visible.
|
|
/// </summary>
|
|
public bool PercentVisible
|
|
{
|
|
get => GameController.OnGodot ? (bool)SceneControl.Get("percent_visible") : default;
|
|
set
|
|
{
|
|
if (GameController.OnGodot) SceneControl.Set("percent_visible", value);
|
|
}
|
|
}
|
|
|
|
private protected override Godot.Control SpawnSceneControl()
|
|
{
|
|
return new Godot.ProgressBar();
|
|
}
|
|
}
|
|
}
|