mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-19 15:02:15 +01:00
Show vehicle and texture info when a browser entry is picked
The General and About texture tabs only ever described the selected consist car, so clicking a vehicle in the list told the user nothing about it.
This commit is contained in:
@@ -49,6 +49,8 @@ public sealed class VehicleBrowser
|
||||
|
||||
public VehicleTexture? Selected { get; private set; }
|
||||
|
||||
public Action<VehicleTexture>? TextureSelected { get; set; }
|
||||
|
||||
private bool _suppress;
|
||||
private bool _syncingCombos;
|
||||
|
||||
@@ -342,6 +344,11 @@ public sealed class VehicleBrowser
|
||||
miniPreview.Source = _minis.Get(_db.ResolveMiniName(texture), MiniPreviewHeight);
|
||||
addVehicleButton.IsEnabled = true;
|
||||
SyncCombosTo(texture);
|
||||
|
||||
// Clicking a card in the consist also selects its texture here. The
|
||||
// detail panels then belong to that car, not to the catalogue entry.
|
||||
if (!_syncingCombos)
|
||||
TextureSelected?.Invoke(texture);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user