diff --git a/StarterNG/Classes/VehicleDatabase.cs b/StarterNG/Classes/VehicleDatabase.cs index 0cdf436..e9dd68b 100644 --- a/StarterNG/Classes/VehicleDatabase.cs +++ b/StarterNG/Classes/VehicleDatabase.cs @@ -279,10 +279,24 @@ public class VehicleDatabase if (t.Group != null) GroupsById.TryGetValue(t.Group, out g); - t.ResolvedCategory = g?.Category; - t.ResolvedClass = g != null && !string.IsNullOrEmpty(g.Mini) + string mini = g != null && !string.IsNullOrEmpty(g.Mini) ? g.Mini! : t.MiniRef ?? ""; + + string? category = g?.Category; + + // A "*" category is a wildcard: the actual category is the first letter + // of the mini (upper-cased, like the original Starter's UpCase(mini[1]) + // wagon-typing), e.g. a "Bdhpumn" mini -> category "B". + if (category == "*") + { + string source = !string.IsNullOrEmpty(mini) ? mini : (t.TextureMini ?? ""); + if (source.Length > 0) + category = char.ToUpperInvariant(source[0]).ToString(); + } + + t.ResolvedCategory = category; + t.ResolvedClass = mini; } } diff --git a/StarterNG/MainWindow.axaml b/StarterNG/MainWindow.axaml index 5196d93..0ca9660 100644 --- a/StarterNG/MainWindow.axaml +++ b/StarterNG/MainWindow.axaml @@ -27,10 +27,15 @@ BorderThickness="0,0,0,1"> - - + + + + diff --git a/StarterNG/MainWindow.axaml.cs b/StarterNG/MainWindow.axaml.cs index 8f7e60e..9844043 100644 --- a/StarterNG/MainWindow.axaml.cs +++ b/StarterNG/MainWindow.axaml.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Text; using System.Threading; using Avalonia.Controls; +using Avalonia.Input; using Avalonia.Interactivity; using Avalonia.Threading; using StarterNG.Classes; @@ -32,6 +33,13 @@ public partial class MainWindow : Window LangCombo.SelectedIndex = App.Loc.CurrentLanguage == "Polski" ? 0 : 1; } + // Lets the user drag the window by the top caption strip. + private void TitleBar_OnPointerPressed(object? sender, PointerPressedEventArgs e) + { + if (e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) + BeginMoveDrag(e); + } + // ── Navigation: show the page whose RadioButton was just checked ────────── private void Nav_OnCheckedChanged(object? sender, RoutedEventArgs e) { diff --git a/StarterNG/StarterNG.csproj b/StarterNG/StarterNG.csproj index 4117f8e..5371485 100644 --- a/StarterNG/StarterNG.csproj +++ b/StarterNG/StarterNG.csproj @@ -8,7 +8,7 @@ true app.manifest true - 1.0.0.1 + 1.0.0.1 1.0.0.1 Starter eu07.pl diff --git a/StarterNG/Styles/Carbon.axaml b/StarterNG/Styles/Carbon.axaml index 3309728..77ed659 100644 --- a/StarterNG/Styles/Carbon.axaml +++ b/StarterNG/Styles/Carbon.axaml @@ -171,11 +171,13 @@ - + @@ -187,4 +189,14 @@ + + + + diff --git a/StarterNG/Views/Depot.axaml b/StarterNG/Views/Depot.axaml index d2ede6d..d5ce7e2 100644 --- a/StarterNG/Views/Depot.axaml +++ b/StarterNG/Views/Depot.axaml @@ -13,9 +13,11 @@ - - - + + + + @@ -57,43 +59,31 @@ - + - - - - - + Header="{Binding [MapConsists], Source={x:Static starterNg:App.Loc}}"> + + + + - -