InputWidget - MouseWheel increment/decrements
This commit is contained in:
parent
9355bc0f2e
commit
521b2ccfd6
|
@ -130,7 +130,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
|
||||
// Advances to the next widget or the next binding depending on the autotab setting
|
||||
private void Increment()
|
||||
public void Increment()
|
||||
{
|
||||
if (AutoTab)
|
||||
this.Parent.SelectNextControl(this, true, true, true, true);
|
||||
|
@ -143,6 +143,19 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
|
||||
public void Decrement()
|
||||
{
|
||||
if (AutoTab)
|
||||
this.Parent.SelectNextControl(this, false, true, true, true);
|
||||
else
|
||||
{
|
||||
if (pos == 0)
|
||||
pos = MaxBind - 1;
|
||||
else
|
||||
pos--;
|
||||
}
|
||||
}
|
||||
|
||||
public void ClearBindings()
|
||||
{
|
||||
for (int x = 0; x < MaxBind; x++)
|
||||
|
@ -226,6 +239,15 @@ namespace BizHawk.MultiClient
|
|||
base.WndProc(ref m);
|
||||
}
|
||||
|
||||
protected override void OnMouseWheel(MouseEventArgs e)
|
||||
{
|
||||
if (e.Delta > 0)
|
||||
Decrement();
|
||||
else
|
||||
Increment();
|
||||
base.OnMouseWheel(e);
|
||||
}
|
||||
|
||||
protected override void OnGotFocus(EventArgs e)
|
||||
{
|
||||
//base.OnGotFocus(e);
|
||||
|
|
Loading…
Reference in New Issue