mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 05:48:44 +00:00
Database view scroll override
Allow scrolling within panel (instead of while mouse is over the VScrollBar. Since the updateScroll method isn't called by adjusting the value directly (ie, not a scroll event) we just update the boxes manually.
This commit is contained in:
parent
8c4ef40a82
commit
894ff48734
1 changed files with 9 additions and 0 deletions
|
@ -629,5 +629,14 @@ namespace PKHeX
|
|||
{
|
||||
Close();
|
||||
}
|
||||
protected override void OnMouseWheel(MouseEventArgs e)
|
||||
{
|
||||
if (!PAN_Box.RectangleToScreen(PAN_Box.ClientRectangle).Contains(MousePosition))
|
||||
return;
|
||||
int oldval = SCR_Box.Value;
|
||||
int newval = oldval + (e.Delta < 0 ? 1 : -1);
|
||||
if (newval >= SCR_Box.Minimum && SCR_Box.Maximum >= newval)
|
||||
FillPKXBoxes(SCR_Box.Value = newval);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue