TAStudio - wire up the Auto-restore checkbox, only the ui and the saving to the config, the logic of what it does is not in yet
This commit is contained in:
parent
77cae08afa
commit
2ac9395a37
|
@ -525,6 +525,7 @@ namespace BizHawk.Client.Common
|
|||
public bool AutoloadTAStudio = false;
|
||||
public bool AutoloadTAStudioProject = false;
|
||||
public bool TAStudioDrawInput = true;
|
||||
public bool TAStudioAutoRestoreLastPosition = false;
|
||||
|
||||
// VirtualPad Dialog
|
||||
public ToolDialogSettings VirtualPadSettings = new ToolDialogSettings();
|
||||
|
|
|
@ -63,13 +63,13 @@
|
|||
// AutoRestoreCheckbox
|
||||
//
|
||||
this.AutoRestoreCheckbox.AutoSize = true;
|
||||
this.AutoRestoreCheckbox.Enabled = false;
|
||||
this.AutoRestoreCheckbox.Location = new System.Drawing.Point(10, 69);
|
||||
this.AutoRestoreCheckbox.Name = "AutoRestoreCheckbox";
|
||||
this.AutoRestoreCheckbox.Size = new System.Drawing.Size(141, 17);
|
||||
this.AutoRestoreCheckbox.TabIndex = 8;
|
||||
this.AutoRestoreCheckbox.Text = "Auto-restore last position";
|
||||
this.AutoRestoreCheckbox.UseVisualStyleBackColor = true;
|
||||
this.AutoRestoreCheckbox.CheckedChanged += new System.EventHandler(this.AutoRestoreCheckbox_CheckedChanged);
|
||||
//
|
||||
// TurboSeekCheckbox
|
||||
//
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
public partial class PlaybackBox : UserControl
|
||||
{
|
||||
private bool _programmaticallyChangingSeekBox = false;
|
||||
private bool _programmaticallyChangingValue = false;
|
||||
|
||||
public TAStudio Tastudio { get; set; }
|
||||
|
||||
|
@ -31,15 +31,30 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
|
||||
public bool AutoRestore
|
||||
{
|
||||
get
|
||||
{
|
||||
return Global.Config.TAStudioAutoRestoreLastPosition;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
AutoRestoreCheckbox.Checked = Global.Config.TAStudioAutoRestoreLastPosition = value;
|
||||
}
|
||||
}
|
||||
|
||||
public PlaybackBox()
|
||||
{
|
||||
InitializeComponent();
|
||||
_programmaticallyChangingSeekBox = true;
|
||||
_programmaticallyChangingValue = true;
|
||||
if (Global.Config != null) // A check needed for the designer
|
||||
{
|
||||
TurboSeekCheckbox.Checked = Global.Config.TurboSeek;
|
||||
AutoRestoreCheckbox.Checked = Global.Config.TAStudioAutoRestoreLastPosition;
|
||||
}
|
||||
_programmaticallyChangingSeekBox = false;
|
||||
_programmaticallyChangingValue = false;
|
||||
}
|
||||
|
||||
private void PreviousMarkerButton_Click(object sender, EventArgs e)
|
||||
|
@ -69,10 +84,18 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void TurboSeekCheckbox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!_programmaticallyChangingSeekBox)
|
||||
if (!_programmaticallyChangingValue)
|
||||
{
|
||||
Global.Config.TurboSeek ^= true;
|
||||
}
|
||||
}
|
||||
|
||||
private void AutoRestoreCheckbox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!_programmaticallyChangingValue)
|
||||
{
|
||||
Global.Config.TAStudioAutoRestoreLastPosition ^= true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue