mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-03-21 17:48:28 -05:00
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
30 lines
1015 B
C#
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";
|
|
}
|
|
}
|