tastudio: editable HoverInterval for BranchView (stored to TAStudioSettings).

when comparing, we want them to show up instantly.
This commit is contained in:
feos 2015-11-30 23:44:31 +03:00
parent ee860fd820
commit d8ec9e6878
5 changed files with 43 additions and 3 deletions

View File

@ -229,7 +229,7 @@
this.BranchView.FullRowSelect = true;
this.BranchView.HideWasLagFrames = false;
this.BranchView.HorizontalOrientation = false;
this.BranchView.HoverInterval = 500;
this.BranchView.HoverInterval = 1;
this.BranchView.LagFramesToHide = 0;
this.BranchView.Location = new System.Drawing.Point(6, 19);
this.BranchView.MaxCharactersInHorizontal = 1;

View File

@ -21,8 +21,13 @@ namespace BizHawk.Client.EmuHawk
private const string TimeColumnName = "TimeColumn";
private readonly PlatformFrameRates FrameRates = new PlatformFrameRates();
public TAStudio Tastudio { get; set; }
private TasMovie Movie { get { return Tastudio.CurrentTasMovie; } }
public TAStudio Tastudio { get; set; }
public int HoverInterval {
get { return BranchView.HoverInterval; }
set { BranchView.HoverInterval = value; }
}
private TasBranch GetBranch(int id)
{

View File

@ -81,6 +81,7 @@ namespace BizHawk.Client.EmuHawk
this.StateHistoryIntegrityCheckMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ConfigSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.SetMaxUndoLevelsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SetBranchCellHoverIntervalMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
this.AutoadjustInputMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
@ -599,6 +600,7 @@ namespace BizHawk.Client.EmuHawk
//
this.ConfigSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.SetMaxUndoLevelsMenuItem,
this.SetBranchCellHoverIntervalMenuItem,
this.toolStripSeparator9,
this.AutoadjustInputMenuItem,
this.toolStripSeparator11,
@ -628,6 +630,13 @@ namespace BizHawk.Client.EmuHawk
this.SetMaxUndoLevelsMenuItem.Text = "Set max Undo Levels";
this.SetMaxUndoLevelsMenuItem.Click += new System.EventHandler(this.SetMaxUndoLevelsMenuItem_Click);
//
// SetBranchCellHoverIntervalMenuItem
//
this.SetBranchCellHoverIntervalMenuItem.Name = "SetBranchCellHoverIntervalMenuItem";
this.SetBranchCellHoverIntervalMenuItem.Size = new System.Drawing.Size(253, 22);
this.SetBranchCellHoverIntervalMenuItem.Text = "Set Branch Cell Hover Interval";
this.SetBranchCellHoverIntervalMenuItem.Click += new System.EventHandler(this.SetBranchCellHoverIntervalMenuItem_Click);
//
// toolStripSeparator9
//
this.toolStripSeparator9.Name = "toolStripSeparator9";
@ -1667,5 +1676,6 @@ namespace BizHawk.Client.EmuHawk
private System.Windows.Forms.ToolStripMenuItem NewFromSubMenu;
private System.Windows.Forms.ToolStripMenuItem NewFromNowMenuItem;
private System.Windows.Forms.ToolStripMenuItem NewFromCurrentSaveRamMenuItem;
private System.Windows.Forms.ToolStripMenuItem SetBranchCellHoverIntervalMenuItem;
}
}

View File

@ -662,6 +662,28 @@ namespace BizHawk.Client.EmuHawk
}
}
private void SetBranchCellHoverIntervalMenuItem_Click(object sender, EventArgs e)
{
using (var prompt = new InputPrompt
{
TextInputType = InputPrompt.InputType.Unsigned,
Message = "ScreenshotPopUp Delay",
InitialValue = Settings.BranchCellHoverInterval.ToString()
})
{
DialogResult result = prompt.ShowDialog();
if (result == DialogResult.OK)
{
int val = int.Parse(prompt.PromptText);
if (val > 0)
{
Settings.BranchCellHoverInterval = val;
BookMarkControl.HoverInterval = val;
}
}
}
}
private void ConfigSubMenu_DropDownOpened(object sender, EventArgs e)
{
DrawInputByDraggingMenuItem.Checked = Settings.DrawInput;

View File

@ -61,6 +61,7 @@ namespace BizHawk.Client.EmuHawk
ScrollSpeed = 3;
FollowCursorAlwaysScroll = false;
FollowCursorScrollMethod = "near";
BranchCellHoverInterval = 1;
// default to taseditor fashion
denoteStatesWithIcons = false;
denoteStatesWithBGColor = true;
@ -77,6 +78,7 @@ namespace BizHawk.Client.EmuHawk
public int ScrollSpeed { get; set; }
public bool FollowCursorAlwaysScroll { get; set; }
public string FollowCursorScrollMethod { get; set; }
public int BranchCellHoverInterval { get; set; }
public bool denoteStatesWithIcons { get; set; }
public bool denoteStatesWithBGColor { get; set; }
@ -202,7 +204,8 @@ namespace BizHawk.Client.EmuHawk
TasView.InputPaintingMode = Settings.DrawInput;
TasView.ScrollSpeed = Settings.ScrollSpeed;
TasView.AlwaysScroll = Settings.FollowCursorAlwaysScroll;
TasView.ScrollMethod = Settings.FollowCursorScrollMethod;
TasView.ScrollMethod = Settings.FollowCursorScrollMethod;
BookMarkControl.HoverInterval = Settings.BranchCellHoverInterval;
TasView.denoteStatesWithIcons = Settings.denoteStatesWithIcons;
TasView.denoteStatesWithBGColor = Settings.denoteStatesWithBGColor;