mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 04:23:12 +00:00
parent
3e8527f11a
commit
95054f0054
1 changed files with 10 additions and 4 deletions
|
@ -56,10 +56,16 @@ namespace PKHeX.WinForms
|
||||||
|
|
||||||
CAL_AdventureStartDate.Value = CAL_AdventureStartTime.Value = SAV.AdventureStart.Timestamp;
|
CAL_AdventureStartDate.Value = CAL_AdventureStartTime.Value = SAV.AdventureStart.Timestamp;
|
||||||
|
|
||||||
NUD_MeritCurrent.Value = (uint)SAV.Blocks.GetBlockValue(SaveBlockAccessor8LA.KMeritCurrent);
|
LoadClamp(NUD_MeritCurrent, SaveBlockAccessor8LA.KMeritCurrent);
|
||||||
NUD_MeritEarned.Value = (uint)SAV.Blocks.GetBlockValue(SaveBlockAccessor8LA.KMeritEarnedTotal);
|
LoadClamp(NUD_MeritEarned, SaveBlockAccessor8LA.KMeritEarnedTotal);
|
||||||
NUD_Rank.Value = (uint)SAV.Blocks.GetBlockValue(SaveBlockAccessor8LA.KExpeditionTeamRank);
|
LoadClamp(NUD_Rank, SaveBlockAccessor8LA.KExpeditionTeamRank);
|
||||||
NUD_Satchel.Value = (uint)SAV.Blocks.GetBlockValue(SaveBlockAccessor8LA.KSatchelUpgrades);
|
LoadClamp(NUD_Satchel, SaveBlockAccessor8LA.KSatchelUpgrades);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadClamp(NumericUpDown nud, uint key)
|
||||||
|
{
|
||||||
|
var actual = (uint)SAV.Blocks.GetBlockValue(key);
|
||||||
|
nud.Value = Math.Min(actual, nud.Maximum);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Save()
|
private void Save()
|
||||||
|
|
Loading…
Reference in a new issue