PKHeX/PKHeX.Avalonia/ViewModels/Subforms/CGearImage5ViewModel.cs
montanon 7f44bc2e1e Add Gen 5-6 subform dialogs
17 generation-specific subforms:

Gen 5: Misc5, Pokedex5, DLC5, UnityTower5, CGearImage5
Gen 6: Trainer6, SecretBase6, PokedexXY, PokedexORAS,
       HallOfFame6, SuperTrain6, Link6, OPower6, Pokepuff6,
       BerryFieldXY, PokeBlockORAS, Roamer6
2026-03-18 15:32:35 -03:00

30 lines
1015 B
C#

using CommunityToolkit.Mvvm.ComponentModel;
using PKHeX.Core;
namespace PKHeX.Avalonia.ViewModels.Subforms;
/// <summary>
/// ViewModel for the C-Gear skin image display (Gen 5).
/// Shows the current C-Gear background skin dimensions and status.
/// </summary>
public partial class CGearImage5ViewModel : SaveEditorViewModelBase
{
[ObservableProperty] private bool _hasSkin;
[ObservableProperty] private string _skinStatus = "No C-Gear skin loaded";
[ObservableProperty] private int _width;
[ObservableProperty] private int _height;
public CGearImage5ViewModel(SAV5 sav) : base(sav)
{
var data = sav.CGearSkinData;
CGearBackground bg = sav is SAV5BW ? new CGearBackgroundBW(data) : new CGearBackgroundB2W2(data);
_width = CGearBackground.Width;
_height = CGearBackground.Height;
_hasSkin = !bg.IsUninitialized;
_skinStatus = _hasSkin
? $"C-Gear skin loaded ({_width}x{_height})"
: "No C-Gear skin loaded";
}
}