mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-05 21:17:14 -05:00
* Underground Score Editor first commit * not needed space * changed anchor points * added dp offsets, ug scores to underground, underground button click code
54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
using System;
|
|
using System.Linq;
|
|
using System.Windows.Forms;
|
|
using PKHeX.Core;
|
|
|
|
namespace PKHeX.WinForms
|
|
{
|
|
public partial class SAV_Underground : Form
|
|
{
|
|
private readonly SaveFile Origin;
|
|
private readonly SAV4 SAV;
|
|
public SAV_Underground(SaveFile sav)
|
|
{
|
|
SAV = (SAV4)(Origin = sav).Clone();
|
|
InitializeComponent();
|
|
WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);
|
|
|
|
GetUGScores();
|
|
}
|
|
|
|
private void GetUGScores()
|
|
{
|
|
U_PlayersMet.Value = SAV.UG_PlayersMet;
|
|
U_Gifts.Value = SAV.UG_Gifts;
|
|
U_Spheres.Value = SAV.UG_Spheres;
|
|
U_Fossils.Value = SAV.UG_Fossils;
|
|
U_TrapsA.Value = SAV.UG_TrapsAvoided;
|
|
U_TrapsT.Value = SAV.UG_TrapsTriggered;
|
|
U_Flags.Value = SAV.UG_Flags;
|
|
}
|
|
|
|
private void SetUGScores()
|
|
{
|
|
SAV.UG_PlayersMet = (int)U_PlayersMet.Value;
|
|
SAV.UG_Gifts = (int)U_Gifts.Value;
|
|
SAV.UG_Spheres = (int)U_Spheres.Value;
|
|
SAV.UG_Fossils = (int)U_Fossils.Value;
|
|
SAV.UG_TrapsAvoided = (int)U_TrapsA.Value;
|
|
SAV.UG_TrapsTriggered = (int)U_TrapsT.Value;
|
|
SAV.UG_Flags = (int)U_Flags.Value;
|
|
}
|
|
|
|
private void B_Save_Click(object sender, EventArgs e)
|
|
{
|
|
SetUGScores();
|
|
Origin.SetData(SAV.Data, 0);
|
|
Close();
|
|
}
|
|
|
|
private void B_Cancel_Click(object sender, EventArgs e) => Close();
|
|
|
|
}
|
|
}
|