Add toggle to TAStudio for including frame no. when copying rows
resolves #2643
This commit is contained in:
parent
c4ff971113
commit
a26753234b
|
@ -191,6 +191,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
this.BranchesMarkersSplit = new System.Windows.Forms.SplitContainer();
|
||||
this.MainVertialSplit = new System.Windows.Forms.SplitContainer();
|
||||
this.SetFontMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
|
||||
this.CopyIncludesFrameNoMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
|
||||
this.TASMenu.SuspendLayout();
|
||||
this.TasStatusStrip.SuspendLayout();
|
||||
this.RightClickMenu.SuspendLayout();
|
||||
|
@ -481,6 +482,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
this.SetMaxUndoLevelsMenuItem,
|
||||
this.SetBranchCellHoverIntervalMenuItem,
|
||||
this.SetSeekingCutoffIntervalMenuItem,
|
||||
this.CopyIncludesFrameNoMenuItem,
|
||||
this.toolStripSeparator26,
|
||||
this.autosaveToolStripMenuItem,
|
||||
this.BackupPerFileSaveMenuItem,
|
||||
|
@ -1176,6 +1178,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
this.SetFontMenuItem.Text = "Set Font";
|
||||
this.SetFontMenuItem.Click += new System.EventHandler(this.SetFontMenuItem_Click);
|
||||
//
|
||||
// CopyIncludesFrameNoMenuItem
|
||||
//
|
||||
this.CopyIncludesFrameNoMenuItem.Text = "Include Frame No. When Copying Row(s)";
|
||||
this.CopyIncludesFrameNoMenuItem.Click += new System.EventHandler(this.CopyIncludesFrameNoMenuItem_Click);
|
||||
//
|
||||
// TAStudio
|
||||
//
|
||||
this.AllowDrop = true;
|
||||
|
@ -1374,5 +1381,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
private BizHawk.WinForms.Controls.ToolStripMenuItemEx SingleClickAxisEditMenuItem;
|
||||
private BizHawk.WinForms.Controls.ToolStripMenuItemEx LoadBranchOnDoubleclickMenuItem;
|
||||
private BizHawk.WinForms.Controls.ToolStripMenuItemEx SetFontMenuItem;
|
||||
private BizHawk.WinForms.Controls.ToolStripMenuItemEx CopyIncludesFrameNoMenuItem;
|
||||
}
|
||||
}
|
|
@ -313,6 +313,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
/// <returns><paramref name="index"/> with leading zeroes such that every frame in the movie will be printed with the same number of digits</returns>
|
||||
private string FrameToStringPadded(int index)
|
||||
=> index.ToString().PadLeft(CurrentTasMovie.InputLogLength.ToString().Length, '0');
|
||||
|
||||
private void TasView_QueryItemText(int index, RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
{
|
||||
if (!_engaged || _initializing)
|
||||
|
@ -344,7 +348,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
else if (columnName == FrameColumnName)
|
||||
{
|
||||
offsetX = TasView.HorizontalOrientation ? 2 : 7;
|
||||
text = index.ToString().PadLeft(CurrentTasMovie.InputLogLength.ToString().Length, '0');
|
||||
text = FrameToStringPadded(index);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -461,8 +461,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
|
||||
_tasClipboard.Add(new TasClipboardEntry(index, input));
|
||||
var lg = CurrentTasMovie.LogGeneratorInstance(input);
|
||||
sb.AppendLine(lg.GenerateLogEntry());
|
||||
var logEntry = CurrentTasMovie.LogGeneratorInstance(input).GenerateLogEntry();
|
||||
sb.AppendLine(Settings.CopyIncludesFrameNo ? $"{FrameToStringPadded(index)} {logEntry}" : logEntry);
|
||||
}
|
||||
|
||||
Clipboard.SetDataObject(sb.ToString());
|
||||
|
@ -828,6 +828,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
OldControlSchemeForBranchesMenuItem.Checked = Settings.OldControlSchemeForBranches;
|
||||
LoadBranchOnDoubleclickMenuItem.Checked = Settings.LoadBranchOnDoubleClick;
|
||||
BindMarkersToInputMenuItem.Checked = CurrentTasMovie.BindMarkersToInput;
|
||||
CopyIncludesFrameNoMenuItem.Checked = Settings.CopyIncludesFrameNo;
|
||||
}
|
||||
|
||||
private void SetMaxUndoLevelsMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -901,6 +902,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void CopyIncludesFrameNoMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Settings.CopyIncludesFrameNo ^= true;
|
||||
}
|
||||
|
||||
private void SetAutosaveIntervalMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var prompt = new InputPrompt
|
||||
|
|
|
@ -75,6 +75,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
SingleClickAxisEdit = false;
|
||||
OldControlSchemeForBranches = false;
|
||||
LoadBranchOnDoubleClick = true;
|
||||
CopyIncludesFrameNo = false;
|
||||
|
||||
// default to taseditor fashion
|
||||
DenoteStatesWithIcons = false;
|
||||
|
@ -107,6 +108,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
public int MainVerticalSplitDistance { get; set; }
|
||||
public int BranchMarkerSplitDistance { get; set; }
|
||||
public bool BindMarkersToInput { get; set; }
|
||||
public bool CopyIncludesFrameNo { get; set; }
|
||||
}
|
||||
|
||||
public TAStudio()
|
||||
|
|
Loading…
Reference in New Issue