Table of Contents

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

bool

CanResetToDefaults

Gets a value indicating whether any values can be reset to their defaults.

public bool CanResetToDefaults { get; }

Property Value

bool

Categories

Gets the list of setup categories.

public IReadOnlyList<SetupUiCategoryModel> Categories { get; }

Property Value

IReadOnlyList<SetupUiCategoryModel>

NonDefaultChangeCount

Gets the number of values that have been changed from their defaults.

public int NonDefaultChangeCount { get; }

Property Value

int

PendingChangeCount

Gets the total number of pending changes across all categories.

public int PendingChangeCount { get; }

Property Value

int

PendingLiveChangeCount

Gets the number of pending changes that can be applied live.

public int PendingLiveChangeCount { get; }

Property Value

int

PendingReloadChangeCount

Gets the number of pending changes that require a reload.

public int PendingReloadChangeCount { get; }

Property Value

int

SelectedCategory

Gets the currently selected category model.

public SetupUiCategoryModel SelectedCategory { get; }

Property Value

SetupUiCategoryModel

SelectedCategoryIndex

Gets the index of the currently selected category.

public int SelectedCategoryIndex { get; }

Property Value

int

StatusText

Gets the current status or instruction text.

public string StatusText { get; }

Property Value

string

Subtitle

Gets the subtitle or description of the setup shell.

public string Subtitle { get; }

Property Value

string

Title

Gets the main title of the setup shell.

public string Title { get; }

Property Value

string

VehicleName

Gets the name of the vehicle currently being tuned.

public string VehicleName { get; }

Property Value

string

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

SetupUiApplyPayload

A SetupUiApplyPayload.

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

vehicle LoadedVehicle

The loaded vehicle.

overrides VehicleSetupOverrides

The setup overrides.

vehicleName string

Optional vehicle name.

statusText string

Optional status text.

Returns

SetupUiShellModel

A new SetupUiShellModel.

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

vehicleName string

Optional vehicle name.

statusText string

Optional status text.

Returns

SetupUiShellModel

A new SetupUiShellModel.

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

index int

The 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)

Parameters

vehicleName string

The name of the vehicle.

statusText string

The status text.