Number TAStudio branches from 1 (resolves #3112)
This commit is contained in:
parent
e7fd93b41a
commit
965cbe615c
|
@ -26,7 +26,7 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
if (movie is ITasMovie tasMovie)
|
if (movie is ITasMovie tasMovie)
|
||||||
{
|
{
|
||||||
_slots[i] = i < tasMovie.Branches.Count;
|
_slots[(i + 1) % 10] = i < tasMovie.Branches.Count;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -110,7 +110,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
text = column.Name switch
|
text = column.Name switch
|
||||||
{
|
{
|
||||||
BranchNumberColumnName => index.ToString(),
|
BranchNumberColumnName => (index + 1).ToString(),
|
||||||
FrameColumnName => Branches[index].Frame.ToString(),
|
FrameColumnName => Branches[index].Frame.ToString(),
|
||||||
UserTextColumnName => Branches[index].UserText,
|
UserTextColumnName => Branches[index].UserText,
|
||||||
_ => text
|
_ => text
|
||||||
|
@ -218,7 +218,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
Branches.Current = index;
|
Branches.Current = index;
|
||||||
LoadBranch(SelectedBranch);
|
LoadBranch(SelectedBranch);
|
||||||
BranchView.Refresh();
|
BranchView.Refresh();
|
||||||
Tastudio.MainForm.AddOnScreenMessage($"Loaded branch {Branches.Current}");
|
Tastudio.MainForm.AddOnScreenMessage($"Loaded branch {Branches.Current + 1}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
Branch();
|
Branch();
|
||||||
SavedCallback?.Invoke(Branches.Count - 1);
|
SavedCallback?.Invoke(Branches.Count - 1);
|
||||||
Tastudio.MainForm.AddOnScreenMessage($"Added branch {Branches.Current}");
|
Tastudio.MainForm.AddOnScreenMessage($"Added branch {Branches.Current + 1}");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddBranchWithTexToolStripMenuItem_Click(object sender, EventArgs e)
|
private void AddBranchWithTexToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
@ -245,7 +245,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
Branch();
|
Branch();
|
||||||
EditBranchTextPopUp(Branches.Current);
|
EditBranchTextPopUp(Branches.Current);
|
||||||
SavedCallback?.Invoke(Branches.Count - 1);
|
SavedCallback?.Invoke(Branches.Count - 1);
|
||||||
Tastudio.MainForm.AddOnScreenMessage($"Added branch {Branches.Current}");
|
Tastudio.MainForm.AddOnScreenMessage($"Added branch {Branches.Current + 1}");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadBranchToolStripMenuItem_Click(object sender, EventArgs e)
|
private void LoadBranchToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
@ -290,7 +290,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
Branches.Replace(SelectedBranch, CreateBranch());
|
Branches.Replace(SelectedBranch, CreateBranch());
|
||||||
Tastudio.RefreshDialog();
|
Tastudio.RefreshDialog();
|
||||||
SavedCallback?.Invoke(Branches.Current);
|
SavedCallback?.Invoke(Branches.Current);
|
||||||
Tastudio.MainForm.AddOnScreenMessage($"Saved branch {Branches.Current}");
|
Tastudio.MainForm.AddOnScreenMessage($"Saved branch {Branches.Current + 1}");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EditBranchTextToolStripMenuItem_Click(object sender, EventArgs e)
|
private void EditBranchTextToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
@ -312,7 +312,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
toolTip1.SetToolTip(UndoBranchButton, "Undo Branch Text Edit");
|
toolTip1.SetToolTip(UndoBranchButton, "Undo Branch Text Edit");
|
||||||
_branchUndo = BranchUndo.Text;
|
_branchUndo = BranchUndo.Text;
|
||||||
|
|
||||||
Tastudio.MainForm.AddOnScreenMessage($"Edited branch {index}");
|
Tastudio.MainForm.AddOnScreenMessage($"Edited branch {index + 1}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,7 +342,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
_backupBranch = branches[index].Clone();
|
_backupBranch = branches[index].Clone();
|
||||||
Branches.Remove(branches[index]);
|
Branches.Remove(branches[index]);
|
||||||
RemovedCallback?.Invoke(index);
|
RemovedCallback?.Invoke(index);
|
||||||
Tastudio.MainForm.AddOnScreenMessage($"Removed branch {index}");
|
Tastudio.MainForm.AddOnScreenMessage($"Removed branch {index + 1}");
|
||||||
|
|
||||||
if (index == Branches.Current)
|
if (index == Branches.Current)
|
||||||
{
|
{
|
||||||
|
@ -529,7 +529,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
public void NonExistentBranchMessage(int slot)
|
public void NonExistentBranchMessage(int slot)
|
||||||
{
|
{
|
||||||
string binding = Tastudio.Config.HotkeyBindings.First(x => x.DisplayName == "Add Branch").Bindings;
|
string binding = Tastudio.Config.HotkeyBindings.First(x => x.DisplayName == "Add Branch").Bindings;
|
||||||
Tastudio.MainForm.AddOnScreenMessage($"Branch {slot} does not exist");
|
Tastudio.MainForm.AddOnScreenMessage($"Branch {slot + 1} does not exist");
|
||||||
Tastudio.MainForm.AddOnScreenMessage($"Use {binding} to add branches");
|
Tastudio.MainForm.AddOnScreenMessage($"Use {binding} to add branches");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -573,7 +573,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
var i = new InputPrompt
|
var i = new InputPrompt
|
||||||
{
|
{
|
||||||
Text = $"Text for branch {index}",
|
Text = $"Text for branch {index + 1}",
|
||||||
TextInputType = InputPrompt.InputType.Text,
|
TextInputType = InputPrompt.InputType.Text,
|
||||||
Message = "Enter a message",
|
Message = "Enter a message",
|
||||||
InitialValue = branch.UserText
|
InitialValue = branch.UserText
|
||||||
|
|
|
@ -32,17 +32,17 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
public void SaveQuickSave(int slot)
|
public void SaveQuickSave(int slot)
|
||||||
{
|
{
|
||||||
BookMarkControl.UpdateBranchExternal(slot);
|
BookMarkControl.UpdateBranchExternal(slot is 0 ? 9 : slot - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadQuickSave(int slot)
|
public void LoadQuickSave(int slot)
|
||||||
{
|
{
|
||||||
BookMarkControl.LoadBranchExternal(slot);
|
BookMarkControl.LoadBranchExternal(slot is 0 ? 9 : slot - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool SelectSlot(int slot)
|
public bool SelectSlot(int slot)
|
||||||
{
|
{
|
||||||
BookMarkControl.SelectBranchExternal(slot);
|
BookMarkControl.SelectBranchExternal(slot is 0 ? 9 : slot - 1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue