mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-25 21:40:21 +00:00
Added Box Clone key-click
CTRL-SHIFT-ALT & Click -> copy to all 30 slots from viewing tabs if valid.
This commit is contained in:
parent
73510d261f
commit
7b57e42125
1 changed files with 21 additions and 2 deletions
|
@ -3990,7 +3990,7 @@ namespace PKHeX
|
||||||
// Open/Save Array Manipulation //
|
// Open/Save Array Manipulation //
|
||||||
public bool verifiedpkx()
|
public bool verifiedpkx()
|
||||||
{
|
{
|
||||||
if (ModifierKeys == (Keys.Control | Keys.Shift))
|
if (ModifierKeys == (Keys.Control | Keys.Shift | Keys.Alt))
|
||||||
return true; // Override
|
return true; // Override
|
||||||
// Make sure the PKX Fields are filled out properly (color check)
|
// Make sure the PKX Fields are filled out properly (color check)
|
||||||
#region ComboBoxes
|
#region ComboBoxes
|
||||||
|
@ -5154,6 +5154,21 @@ namespace PKHeX
|
||||||
|
|
||||||
getSlotColor(slot, Properties.Resources.slotDel);
|
getSlotColor(slot, Properties.Resources.slotDel);
|
||||||
}
|
}
|
||||||
|
private void cloneBox(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!verifiedpkx()) { return; }
|
||||||
|
int slot = getSlot(sender);
|
||||||
|
if (slot > 30) return;
|
||||||
|
|
||||||
|
byte[] pkxdata = preparepkx(buff);
|
||||||
|
byte[] ekxdata = PKX.encryptArray(pkxdata);
|
||||||
|
for (int i = 0; i < 30; i++)
|
||||||
|
Array.Copy(ekxdata, 0, savefile, getPKXOffset(i), 0xE8);
|
||||||
|
|
||||||
|
setPokedex(pkxdata);
|
||||||
|
setPKXBoxes();
|
||||||
|
savedited = true;
|
||||||
|
}
|
||||||
private void setPokedex(byte[] pkxdata)
|
private void setPokedex(byte[] pkxdata)
|
||||||
{
|
{
|
||||||
if (savegame_oras) return; // not yet ready for ORAS
|
if (savegame_oras) return; // not yet ready for ORAS
|
||||||
|
@ -5235,7 +5250,9 @@ namespace PKHeX
|
||||||
}
|
}
|
||||||
private void slotModifier_Click(object sender, EventArgs e)
|
private void slotModifier_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (ModifierKeys == Keys.Control)
|
if (ModifierKeys == (Keys.Control | Keys.Alt))
|
||||||
|
cloneBox(sender, e);
|
||||||
|
else if (ModifierKeys == Keys.Control)
|
||||||
rcmView_Click(sender, e);
|
rcmView_Click(sender, e);
|
||||||
else if (ModifierKeys == Keys.Shift)
|
else if (ModifierKeys == Keys.Shift)
|
||||||
rcmSet_Click(sender, e);
|
rcmSet_Click(sender, e);
|
||||||
|
@ -6116,6 +6133,8 @@ namespace PKHeX
|
||||||
// Drag & Drop within Box
|
// Drag & Drop within Box
|
||||||
private void pbBoxSlot_MouseDown(object sender, MouseEventArgs e)
|
private void pbBoxSlot_MouseDown(object sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (ModifierKeys == Keys.Control || ModifierKeys == Keys.Alt || ModifierKeys == Keys.Shift || ModifierKeys == (Keys.Control | Keys.Alt))
|
||||||
|
{ slotModifier_Click(sender, (EventArgs)e); return; }
|
||||||
PictureBox pb = (PictureBox)(sender);
|
PictureBox pb = (PictureBox)(sender);
|
||||||
if (pb.Image == null)
|
if (pb.Image == null)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue