mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 06:34:19 +00:00
Change stat label clicks to change nature instead
Document in shortcuts Old behavior was undocumented, and was kinda janky. Closes #3376
This commit is contained in:
parent
936a0e927a
commit
3389a224d1
4 changed files with 42 additions and 28 deletions
|
@ -1,11 +1,12 @@
|
|||
using PKHeX.Core;
|
||||
|
||||
namespace PKHeX.WinForms.Controls
|
||||
namespace PKHeX.WinForms.Controls;
|
||||
|
||||
public interface IMainEditor : IPKMView
|
||||
{
|
||||
public interface IMainEditor : IPKMView
|
||||
{
|
||||
void UpdateIVsGB(bool skipForm);
|
||||
PKM Entity { get; }
|
||||
SaveFile RequestSaveFile { get; }
|
||||
}
|
||||
}
|
||||
PKM Entity { get; }
|
||||
SaveFile RequestSaveFile { get; }
|
||||
|
||||
void UpdateIVsGB(bool skipForm);
|
||||
void ChangeNature(int newNature);
|
||||
}
|
||||
|
|
|
@ -1295,6 +1295,15 @@ namespace PKHeX.WinForms.Controls
|
|||
TB_ExtraByte.Text = Entity.Data[offset].ToString();
|
||||
}
|
||||
|
||||
public void ChangeNature(int newNature)
|
||||
{
|
||||
if (Entity.Format < 3)
|
||||
return;
|
||||
|
||||
var cb = Entity.Format >= 8 ? CB_StatNature : CB_Nature;
|
||||
cb.SelectedValue = newNature;
|
||||
}
|
||||
|
||||
private void UpdateNatureModification(ComboBox cb, int nature)
|
||||
{
|
||||
string text = Stats.UpdateNatureModification(nature);
|
||||
|
|
|
@ -284,29 +284,30 @@ namespace PKHeX.WinForms.Controls
|
|||
|
||||
private void ClickStatLabel(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (sender == Label_SPC)
|
||||
sender = Label_SPA;
|
||||
if (ModifierKeys == Keys.None)
|
||||
return;
|
||||
|
||||
int index = Array.IndexOf(L_Stats, sender as Label);
|
||||
if ((ModifierKeys & Keys.Alt) != 0) // EV
|
||||
int index = Array.IndexOf(L_Stats, sender as Label) - 1;
|
||||
if (index < 0)
|
||||
return;
|
||||
|
||||
if (Entity.Format < 3)
|
||||
return;
|
||||
|
||||
var current = Entity.StatNature;
|
||||
var up = current / 5;
|
||||
var dn = current % 5;
|
||||
switch (ModifierKeys)
|
||||
{
|
||||
bool min = e.Button != MouseButtons.Left;
|
||||
if (Entity is IAwakened)
|
||||
{
|
||||
var value = min ? 0 : 200;
|
||||
MT_AVs[index].Text = value.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
var value = min ? 0 : Entity.GetMaximumEV(index);
|
||||
MT_EVs[index].Text = value.ToString();
|
||||
}
|
||||
}
|
||||
else if ((ModifierKeys & Keys.Control) != 0) // IV
|
||||
{
|
||||
var value = e.Button != MouseButtons.Left ? 0 : Entity.GetMaximumIV(index, true);
|
||||
MT_IVs[index].Text = value.ToString();
|
||||
case Keys.Shift when up != index: up = index; break;
|
||||
case Keys.Alt when dn != index: dn = index; break;
|
||||
case Keys.Control when up != index && dn != index: up = dn = index; break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
var newNature = (up * 5) + dn;
|
||||
MainEditor.ChangeNature(newNature);
|
||||
}
|
||||
|
||||
private void LoadHyperTraining()
|
||||
|
|
|
@ -32,6 +32,7 @@ Control + Click on...
|
|||
- Friendship Label: Set Friendship to 0. (Click = 255 or Base)
|
||||
- Level box: Set Level to 100.
|
||||
- Shiny Button: Make Star Shiny (Xor1)
|
||||
- Stat Label: Pick a neutral nature for this stat
|
||||
|
||||
Alt + Click on...
|
||||
- Preview Sprite to load from a QR url on your clipboard.
|
||||
|
@ -43,12 +44,14 @@ Alt + Click on...
|
|||
- Individual AVs: Set AV to 0.
|
||||
- Individual EVs: Set EV to 0.
|
||||
- Shiny Button: Set SID instead of PID when making shiny
|
||||
- Stat Label: Pick a negative nature for this stat
|
||||
|
||||
Shift + Click on...
|
||||
- Preview Sprite to bring up a QR for the viewed Pokémon.
|
||||
- Individual IVs: Hyper Train the IV (toggles Hyper Training in Gen7 onwards)
|
||||
- Shiny Button: Make Square Shiny (Xor0)
|
||||
- Moves: Apply random moveset.
|
||||
- Stat Label: Pick a positive nature for this stat
|
||||
|
||||
Hold Control when dragging to save encrypted (ekx).
|
||||
|
||||
|
|
Loading…
Reference in a new issue