mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-05 21:17:14 -05:00
20 generation-specific subforms:
Gen 1: EventReset1, HallOfFame1
Gen 2: Misc2
Gen 3: Misc3, SecretBase3, HallOfFame3, Roamer3, RTC3, PokeBlock3Case
Gen 4: Misc4, Pokedex4, Underground, BattlePass, HoneyTree,
Geonet4, Apricorn, Gear, Trainer4BR, PoffinCase, PokeGear
41 lines
910 B
C#
41 lines
910 B
C#
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using CommunityToolkit.Mvvm.Input;
|
|
using PKHeX.Core;
|
|
|
|
namespace PKHeX.Avalonia.ViewModels.Subforms;
|
|
|
|
/// <summary>
|
|
/// ViewModel for the Gen 2 Misc editor.
|
|
/// Provides GS Ball event activation for Crystal saves.
|
|
/// </summary>
|
|
public partial class SAVMisc2ViewModel : SaveEditorViewModelBase
|
|
{
|
|
private readonly SAV2 _sav;
|
|
|
|
[ObservableProperty]
|
|
private bool _showGsBallButton;
|
|
|
|
[ObservableProperty]
|
|
private bool _gsBallEnabled;
|
|
|
|
public SAVMisc2ViewModel(SAV2 sav) : base(sav)
|
|
{
|
|
_sav = sav;
|
|
_showGsBallButton = sav.Version is GameVersion.C;
|
|
_gsBallEnabled = !sav.IsEnabledGSBallMobileEvent;
|
|
}
|
|
|
|
[RelayCommand]
|
|
private void EnableGsBall()
|
|
{
|
|
_sav.EnableGSBallMobileEvent();
|
|
GsBallEnabled = false;
|
|
}
|
|
|
|
[RelayCommand]
|
|
private void Save()
|
|
{
|
|
Modified = true;
|
|
}
|
|
}
|