Class SetupUiShellModel
- Namespace
- LibreRally.HUD
- Assembly
- LibreRally.dll
Data model for the garage setup UI shell.
public sealed class SetupUiShellModel
- Inheritance
-
SetupUiShellModel
- Inherited Members
Properties
CanApply
Gets a value indicating whether there are any pending changes that can be applied.
public bool CanApply { get; }
Property Value
CanResetToDefaults
Gets a value indicating whether any values can be reset to their defaults.
public bool CanResetToDefaults { get; }
Property Value
Categories
Gets the list of setup categories.
public IReadOnlyList<SetupUiCategoryModel> Categories { get; }
Property Value
NonDefaultChangeCount
Gets the number of values that have been changed from their defaults.
public int NonDefaultChangeCount { get; }
Property Value
PendingChangeCount
Gets the total number of pending changes across all categories.
public int PendingChangeCount { get; }
Property Value
PendingLiveChangeCount
Gets the number of pending changes that can be applied live.
public int PendingLiveChangeCount { get; }
Property Value
PendingReloadChangeCount
Gets the number of pending changes that require a reload.
public int PendingReloadChangeCount { get; }
Property Value
SelectedCategory
Gets the currently selected category model.
public SetupUiCategoryModel SelectedCategory { get; }
Property Value
SelectedCategoryIndex
Gets the index of the currently selected category.
public int SelectedCategoryIndex { get; }
Property Value
StatusText
Gets the current status or instruction text.
public string StatusText { get; }
Property Value
Subtitle
Gets the subtitle or description of the setup shell.
public string Subtitle { get; }
Property Value
Title
Gets the main title of the setup shell.
public string Title { get; }
Property Value
VehicleName
Gets the name of the vehicle currently being tuned.
public string VehicleName { get; }
Property Value
Methods
AcceptPendingChanges()
Accepts all pending changes as the new committed values.
public void AcceptPendingChanges()
CreateApplyPayload()
Creates an apply payload containing all pending changes.
public SetupUiApplyPayload CreateApplyPayload()
Returns
CreateFromVehicleSetup(LoadedVehicle?, VehicleSetupOverrides?, string?, string?)
Creates a setup shell model from a loaded vehicle and its setup overrides.
public static SetupUiShellModel CreateFromVehicleSetup(LoadedVehicle? vehicle, VehicleSetupOverrides? overrides, string? vehicleName = null, string? statusText = null)
Parameters
vehicleLoadedVehicleThe loaded vehicle.
overridesVehicleSetupOverridesThe setup overrides.
vehicleNamestringOptional vehicle name.
statusTextstringOptional status text.
Returns
CreatePreview(string?, string?)
Creates a preview version of the setup shell model with mock categories.
public static SetupUiShellModel CreatePreview(string? vehicleName = null, string? statusText = null)
Parameters
Returns
ResetPendingChanges()
Resets all pending changes to their last committed values.
public void ResetPendingChanges()
ResetToDefaults()
Resets all fields to their original default values.
public void ResetToDefaults()
SelectCategory(int)
Selects a category by its index.
public void SelectCategory(int index)
Parameters
indexintThe index of the category to select.
UpdateVehicleContext(string?, string?)
Updates the vehicle name and status text for the UI.
public void UpdateVehicleContext(string? vehicleName, string? statusText)