Game.UI.Widgets.TimeSliderField
Assembly:
Assembly-CSharp (typical for Cities: Skylines 2 mods; adjust if the class is in a different assembly)
Namespace:
Game.UI.Widgets
Type:
public class
Base:
TimeField
Summary:
A lightweight concrete specialization of TimeField
Fields
- This class does not declare any new private or public fields.
Inherited fields (if any) come from TimeFieldand its base classes.
Properties
- This class does not declare any new properties.
Use the properties provided by TimeField, such as (typical examples — actual names depend on the base class implementation): - Value (float) — current slider value
- Min (float) / Max (float) — allowed range
- IsReadOnly / Enabled — UI state
- OnValueChanged (delegate/event) — callback for value changes
Replace the example property names with the actual members from TimeField
Constructors
public TimeSliderField()
This class does not declare an explicit constructor; the default parameterless constructor is available. Initialization behavior (control creation, default ranges, styling) is inherited from TimeFieldand any common UI initialization performed there.
Methods
- This class does not declare any new methods.
Override or use the protected/public methods from TimeFieldif you need to customize creation, binding or event handling (for example OnCreate, OnBind, OnDestroy, etc., if present).
Usage Example
// Create and configure a TimeSliderField (example usage — adapt to actual API names)
var slider = new TimeSliderField();
// Typical inherited properties (replace with actual member names from TimeField<float>):
slider.Min = 0f;
slider.Max = 24f;
slider.Value = 12f;
// Subscribe to value changes (use the actual event or callback member provided by TimeField<float>)
slider.OnValueChanged += (float newValue) =>
{
UnityEngine.Debug.Log("TimeSlider value changed: " + newValue);
};
// Add to your UI layout/container as appropriate for your UI framework
// e.g., parent.AddChild(slider); // pseudo-code — replace with actual UI container API
Notes:
- Because TimeSliderField is a thin typed wrapper, consult the documentation or source of TimeField