Tastudio - Branch context menu item available if pointing at the current frame
This commit is contained in:
parent
125a16ec67
commit
6000a499e7
|
@ -184,5 +184,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
BranchView.ItemCount = Branches.Count;
|
BranchView.ItemCount = Branches.Count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Branch()
|
||||||
|
{
|
||||||
|
// TODO: refactor, creating a branch shouldn't be in context menu click event
|
||||||
|
AddContextMenu_Click(null, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,6 +172,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
this.StartNewProjectFromNowMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.StartNewProjectFromNowMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||||
this.BookMarkControl = new BizHawk.Client.EmuHawk.BookmarksBranchesBox();
|
this.BookMarkControl = new BizHawk.Client.EmuHawk.BookmarksBranchesBox();
|
||||||
|
this.BranchContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.TASMenu.SuspendLayout();
|
this.TASMenu.SuspendLayout();
|
||||||
this.TasStatusStrip.SuspendLayout();
|
this.TasStatusStrip.SuspendLayout();
|
||||||
this.MarkerContextMenu.SuspendLayout();
|
this.MarkerContextMenu.SuspendLayout();
|
||||||
|
@ -1168,10 +1169,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
this.InsertNumFramesContextMenuItem,
|
this.InsertNumFramesContextMenuItem,
|
||||||
this.toolStripSeparator18,
|
this.toolStripSeparator18,
|
||||||
this.TruncateContextMenuItem,
|
this.TruncateContextMenuItem,
|
||||||
|
this.BranchContextMenuItem,
|
||||||
this.StartFromNowSeparator,
|
this.StartFromNowSeparator,
|
||||||
this.StartNewProjectFromNowMenuItem});
|
this.StartNewProjectFromNowMenuItem});
|
||||||
this.RightClickMenu.Name = "RightClickMenu";
|
this.RightClickMenu.Name = "RightClickMenu";
|
||||||
this.RightClickMenu.Size = new System.Drawing.Size(273, 414);
|
this.RightClickMenu.Size = new System.Drawing.Size(273, 458);
|
||||||
this.RightClickMenu.Opened += new System.EventHandler(this.RightClickMenu_Opened);
|
this.RightClickMenu.Opened += new System.EventHandler(this.RightClickMenu_Opened);
|
||||||
//
|
//
|
||||||
// SetMarkersContextMenuItem
|
// SetMarkersContextMenuItem
|
||||||
|
@ -1354,6 +1356,14 @@ namespace BizHawk.Client.EmuHawk
|
||||||
this.BookMarkControl.Name = "BookMarkControl";
|
this.BookMarkControl.Name = "BookMarkControl";
|
||||||
this.BookMarkControl.Size = new System.Drawing.Size(204, 205);
|
this.BookMarkControl.Size = new System.Drawing.Size(204, 205);
|
||||||
this.BookMarkControl.TabIndex = 8;
|
this.BookMarkControl.TabIndex = 8;
|
||||||
|
this.BookMarkControl.Tastudio = null;
|
||||||
|
//
|
||||||
|
// BranchContextMenuItem
|
||||||
|
//
|
||||||
|
this.BranchContextMenuItem.Name = "BranchContextMenuItem";
|
||||||
|
this.BranchContextMenuItem.Size = new System.Drawing.Size(272, 22);
|
||||||
|
this.BranchContextMenuItem.Text = "&Branch";
|
||||||
|
this.BranchContextMenuItem.Click += new System.EventHandler(this.BranchContextMenuItem_Click);
|
||||||
//
|
//
|
||||||
// TAStudio
|
// TAStudio
|
||||||
//
|
//
|
||||||
|
@ -1534,5 +1544,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
private System.Windows.Forms.ToolStripMenuItem applyPatternToPaintedInputToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem applyPatternToPaintedInputToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem onlyOnAutoFireColumnsToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem onlyOnAutoFireColumnsToolStripMenuItem;
|
||||||
private BookmarksBranchesBox BookMarkControl;
|
private BookmarksBranchesBox BookMarkControl;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem BranchContextMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -979,6 +979,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
RemoveMarkersContextMenuItem.Enabled = CurrentTasMovie.Markers.Any(m => TasView.SelectedRows.Contains(m.Frame)); // Disable the option to remove markers if no markers are selected (FCEUX does this).
|
RemoveMarkersContextMenuItem.Enabled = CurrentTasMovie.Markers.Any(m => TasView.SelectedRows.Contains(m.Frame)); // Disable the option to remove markers if no markers are selected (FCEUX does this).
|
||||||
|
|
||||||
CancelSeekContextMenuItem.Enabled = GlobalWin.MainForm.PauseOnFrame.HasValue;
|
CancelSeekContextMenuItem.Enabled = GlobalWin.MainForm.PauseOnFrame.HasValue;
|
||||||
|
|
||||||
|
BranchContextMenuItem.Visible = TasView.CurrentCell.RowIndex == Global.Emulator.Frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CancelSeekContextMenuItem_Click(object sender, EventArgs e)
|
private void CancelSeekContextMenuItem_Click(object sender, EventArgs e)
|
||||||
|
@ -987,6 +989,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
RefreshTasView();
|
RefreshTasView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void BranchContextMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
BookMarkControl.Branch();
|
||||||
|
}
|
||||||
|
|
||||||
private void StartNewProjectFromNowMenuItem_Click(object sender, EventArgs e)
|
private void StartNewProjectFromNowMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (TasView.SelectedRows.Count() == 1 &&
|
if (TasView.SelectedRows.Count() == 1 &&
|
||||||
|
|
Loading…
Reference in New Issue