Disassembler: mouse wheel scrolling
This commit is contained in:
parent
1e4a0da15e
commit
1976e8e027
|
@ -261,6 +261,7 @@
|
|||
this.DisassemblerView.Scroll += new System.Windows.Forms.ScrollEventHandler(this.DisassemblerView_Scroll);
|
||||
this.DisassemblerView.SizeChanged += new System.EventHandler(this.DisassemblerView_SizeChanged);
|
||||
this.DisassemblerView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.DisassemblerView_KeyDown);
|
||||
this.DisassemblerView.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.DisassemblerView_Wheel);
|
||||
//
|
||||
// Address
|
||||
//
|
||||
|
|
|
@ -148,6 +148,35 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void DisassemblerView_Wheel(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Delta > 0)
|
||||
{
|
||||
SmallDecrement();
|
||||
}
|
||||
if (e.Delta > 120)
|
||||
{
|
||||
SmallDecrement();
|
||||
}
|
||||
if (e.Delta > 240)
|
||||
{
|
||||
SmallDecrement();
|
||||
}
|
||||
|
||||
if (e.Delta < 0)
|
||||
{
|
||||
SmallIncrement();
|
||||
}
|
||||
if (e.Delta < -120)
|
||||
{
|
||||
SmallIncrement();
|
||||
}
|
||||
if (e.Delta < -240)
|
||||
{
|
||||
SmallIncrement();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetDisassemblerItemCount()
|
||||
{
|
||||
DisassemblerView.ItemCount = DisassemblerView.NumberOfVisibleRows + 1;
|
||||
|
|
Loading…
Reference in New Issue