diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.Designer.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.Designer.cs index d465fa86a5..fda70a44a9 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.Designer.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.Designer.cs @@ -106,17 +106,19 @@ this.BranchView.FullRowSelect = true; this.BranchView.HideWasLagFrames = false; this.BranchView.HorizontalOrientation = false; + this.BranchView.HoverInterval = 500; this.BranchView.LagFramesToHide = 0; this.BranchView.Location = new System.Drawing.Point(6, 19); this.BranchView.MaxCharactersInHorizontal = 1; this.BranchView.MultiSelect = false; this.BranchView.Name = "BranchView"; this.BranchView.RowCount = 0; - this.BranchView.ScrollSpeed = 182; + this.BranchView.ScrollSpeed = 13; this.BranchView.Size = new System.Drawing.Size(186, 224); this.BranchView.TabIndex = 0; this.BranchView.CellHovered += new BizHawk.Client.EmuHawk.InputRoll.HoverEventHandler(this.BranchView_CellHovered); this.BranchView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.BranchView_MouseDoubleClick); + this.BranchView.MouseLeave += new System.EventHandler(this.BranchView_MouseLeave); this.BranchView.MouseMove += new System.Windows.Forms.MouseEventHandler(this.BranchView_MouseMove); // // BookmarksBranchesBox diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs index 39a802ab39..685b6d90a9 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs @@ -6,7 +6,7 @@ using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; - +using System.Windows.Media; using BizHawk.Emulation.Common; using BizHawk.Client.Common; using BizHawk.Common; @@ -99,6 +99,15 @@ namespace BizHawk.Client.EmuHawk { if (index == CurrentBranch) color = SystemColors.HotTrack; + + // Highlight the branch cell a little, if hovering over it + if (BranchView.CurrentCellIsDataCell && + BranchView.CurrentCell.Column.Name == BranchNumberColumnName && + column.Name == BranchNumberColumnName && + index == BranchView.CurrentCell.RowIndex) + { + color = Color.FromArgb((byte)(color.A - 24), (byte)(color.R - 24), (byte)(color.G - 24), (byte)(color.B - 24)); + } } private void AddContextMenu_Click(object sender, EventArgs e) @@ -227,6 +236,10 @@ namespace BizHawk.Client.EmuHawk { ScreenShotPopUp(Branches[e.NewCell.RowIndex.Value], e.NewCell.RowIndex.Value); } + else + { + CloseScreenShotPopUp(); + } } else { @@ -240,6 +253,10 @@ namespace BizHawk.Client.EmuHawk { CloseScreenShotPopUp(); } + else if (BranchView.CurrentCell.Column.Name == BranchNumberColumnName) + { + BranchView.Refresh(); + } } private void CloseScreenShotPopUp() @@ -247,6 +264,11 @@ namespace BizHawk.Client.EmuHawk Tastudio.ScreenshotControl.Visible = false; } + private void BranchView_MouseLeave(object sender, EventArgs e) + { + Tastudio.ScreenshotControl.Visible = false; + } + private void ScreenShotPopUp(TasBranch branch, int index) { int x = this.Location.X - Tastudio.ScreenshotControl.Width; diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs index d7a05bb853..9612f9e889 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs @@ -525,6 +525,16 @@ namespace BizHawk.Client.EmuHawk [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)] public Cell CurrentCell { get; set; } + [Browsable(false)] + [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)] + public bool CurrentCellIsDataCell + { + get + { + return CurrentCell != null && CurrentCell.RowIndex.HasValue && CurrentCell.Column != null; + } + } + /// /// The previous Cell that the mouse was in. /// @@ -1616,7 +1626,10 @@ namespace BizHawk.Client.EmuHawk // But we went from selected to unselected, that is a change, so catch it here if (hadIndex && CurrentCell.RowIndex.HasValue && CurrentCell.RowIndex > RowCount) { - SelectedIndexChanged(this, new EventArgs()); + if (SelectedIndexChanged != null) + { + SelectedIndexChanged(this, new EventArgs()); + } } } diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs index e3b197e9a7..92782e0727 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs @@ -39,7 +39,7 @@ namespace BizHawk.Client.EmuHawk public ScreenshotPopupControl ScreenshotControl = new ScreenshotPopupControl { - Size = new Size(200, 200), + Size = new Size(256, 240), }; [ConfigPersist]