TAStudio - make a RightScrolled event for when the right mouse is clicked and the mouse wheel is scrolled, as refactored some code, this give better (but still broken) refreshing. Now the main window updates when the mouse wheel is done movie at least, as opposed to when the right mouse button is released.
This commit is contained in:
parent
0326c9812e
commit
a3914e84a4
|
@ -149,5 +149,28 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
base.OnMouseUp(e);
|
||||
}
|
||||
|
||||
protected override void OnMouseWheel(MouseEventArgs e)
|
||||
{
|
||||
if (RightButtonHeld)
|
||||
{
|
||||
DoRightMouseScroll(this, e);
|
||||
}
|
||||
else
|
||||
{
|
||||
base.OnMouseWheel(e);
|
||||
}
|
||||
}
|
||||
|
||||
public delegate void RightMouseScrollEventHandler(object sender, MouseEventArgs e);
|
||||
public event RightMouseScrollEventHandler RightMouseScrolled;
|
||||
|
||||
private void DoRightMouseScroll(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (RightMouseScrolled != null)
|
||||
{
|
||||
RightMouseScrolled(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -697,7 +697,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
this.TasView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.TasView_MouseDoubleClick);
|
||||
this.TasView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.TasView_MouseDown);
|
||||
this.TasView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.TasView_MouseUp);
|
||||
this.TasView.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.TasView_MouseWheel);
|
||||
this.TasView.RightMouseScrolled += new TasListView.RightMouseScrollEventHandler(this.TasView_MouseWheel);
|
||||
//
|
||||
// Frame
|
||||
//
|
||||
|
|
|
@ -201,34 +201,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: move me
|
||||
// Sets either the pending frame or the tas input log
|
||||
private void ToggleBoolState(int frame, string buttonName)
|
||||
{
|
||||
if (frame < _tas.InputLogLength)
|
||||
{
|
||||
_tas.ToggleBoolState(frame, buttonName);
|
||||
}
|
||||
else if (frame == Global.Emulator.Frame && frame == _tas.InputLogLength)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Toggle(buttonName);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: move me
|
||||
// Sets either the pending frame or the tas input log
|
||||
private void SetBoolState(int frame, string buttonName, bool value)
|
||||
{
|
||||
if (frame < _tas.InputLogLength)
|
||||
{
|
||||
_tas.SetBoolState(frame, buttonName, value);
|
||||
}
|
||||
else if (frame == Global.Emulator.Frame && frame == _tas.InputLogLength)
|
||||
{
|
||||
Global.ClickyVirtualPadController.SetBool(buttonName, value);
|
||||
}
|
||||
}
|
||||
|
||||
private void TasView_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
_startMarkerDrag = false;
|
||||
|
|
|
@ -459,6 +459,34 @@ namespace BizHawk.Client.EmuHawk
|
|||
// TODO
|
||||
}
|
||||
|
||||
// TODO: move me
|
||||
// Sets either the pending frame or the tas input log
|
||||
private void ToggleBoolState(int frame, string buttonName)
|
||||
{
|
||||
if (frame < _tas.InputLogLength)
|
||||
{
|
||||
_tas.ToggleBoolState(frame, buttonName);
|
||||
}
|
||||
else if (frame == Global.Emulator.Frame && frame == _tas.InputLogLength)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Toggle(buttonName);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: move me
|
||||
// Sets either the pending frame or the tas input log
|
||||
private void SetBoolState(int frame, string buttonName, bool value)
|
||||
{
|
||||
if (frame < _tas.InputLogLength)
|
||||
{
|
||||
_tas.SetBoolState(frame, buttonName, value);
|
||||
}
|
||||
else if (frame == Global.Emulator.Frame && frame == _tas.InputLogLength)
|
||||
{
|
||||
Global.ClickyVirtualPadController.SetBool(buttonName, value);
|
||||
}
|
||||
}
|
||||
|
||||
#region Events
|
||||
|
||||
#region File Menu
|
||||
|
|
Loading…
Reference in New Issue