tastudio - implement follow cursor
This commit is contained in:
parent
f7939125e7
commit
2fb986715e
|
@ -531,6 +531,7 @@ namespace BizHawk.Client.Common
|
|||
public bool TAStudioDrawInput = true;
|
||||
public bool TAStudioAutoPause = true;
|
||||
public bool TAStudioAutoRestoreLastPosition = false;
|
||||
public bool TAStudioFollowCursor = true;
|
||||
|
||||
// VirtualPad Dialog
|
||||
public ToolDialogSettings VirtualPadSettings = new ToolDialogSettings();
|
||||
|
|
|
@ -85,13 +85,13 @@
|
|||
// FollowCursorCheckbox
|
||||
//
|
||||
this.FollowCursorCheckbox.AutoSize = true;
|
||||
this.FollowCursorCheckbox.Enabled = false;
|
||||
this.FollowCursorCheckbox.Location = new System.Drawing.Point(10, 48);
|
||||
this.FollowCursorCheckbox.Name = "FollowCursorCheckbox";
|
||||
this.FollowCursorCheckbox.Size = new System.Drawing.Size(89, 17);
|
||||
this.FollowCursorCheckbox.TabIndex = 5;
|
||||
this.FollowCursorCheckbox.Text = "Follow Cursor";
|
||||
this.FollowCursorCheckbox.UseVisualStyleBackColor = true;
|
||||
this.FollowCursorCheckbox.CheckedChanged += new System.EventHandler(this.FollowCursorCheckbox_CheckedChanged);
|
||||
//
|
||||
// NextMarkerButton
|
||||
//
|
||||
|
|
|
@ -47,6 +47,21 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
[Browsable(false)]
|
||||
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
|
||||
public bool FollowCursor
|
||||
{
|
||||
get
|
||||
{
|
||||
return Global.Config.TAStudioFollowCursor;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
FollowCursorCheckbox.Checked = Global.Config.TAStudioFollowCursor = value;
|
||||
}
|
||||
}
|
||||
|
||||
public PlaybackBox()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
@ -55,6 +70,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
TurboSeekCheckbox.Checked = Global.Config.TurboSeek;
|
||||
AutoRestoreCheckbox.Checked = Global.Config.TAStudioAutoRestoreLastPosition;
|
||||
FollowCursorCheckbox.Checked = Global.Config.TAStudioFollowCursor;
|
||||
}
|
||||
_programmaticallyChangingValue = false;
|
||||
}
|
||||
|
@ -99,5 +115,19 @@ namespace BizHawk.Client.EmuHawk
|
|||
Global.Config.TAStudioAutoRestoreLastPosition ^= true;
|
||||
}
|
||||
}
|
||||
|
||||
private void FollowCursorCheckbox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!_programmaticallyChangingValue)
|
||||
{
|
||||
Global.Config.TAStudioFollowCursor ^= true;
|
||||
|
||||
if (Global.Config.TAStudioFollowCursor)
|
||||
{
|
||||
Tastudio.SetVisibleIndex();
|
||||
Tastudio.RefreshDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
return;
|
||||
}
|
||||
|
||||
SetVisibleIndex();
|
||||
if (TasPlaybackBox.FollowCursor)
|
||||
{
|
||||
SetVisibleIndex();
|
||||
}
|
||||
|
||||
RefreshDialog();
|
||||
}
|
||||
|
||||
|
@ -33,7 +37,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
|
||||
TasView.RowCount = _currentTasMovie.InputLogLength + 1;
|
||||
SetVisibleIndex();
|
||||
|
||||
if (TasPlaybackBox.FollowCursor)
|
||||
{
|
||||
SetVisibleIndex();
|
||||
}
|
||||
}
|
||||
|
||||
public void Restart()
|
||||
|
@ -81,7 +89,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
return true;
|
||||
}
|
||||
|
||||
private void SetVisibleIndex(int? indexThatMustBeVisible = null)
|
||||
public void SetVisibleIndex(int? indexThatMustBeVisible = null)
|
||||
{
|
||||
if (!indexThatMustBeVisible.HasValue)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue