tastudio: better check if it was engaged.
baka-yoke branch messages.
This commit is contained in:
parent
33fd1d86ea
commit
84ea239180
|
@ -1567,7 +1567,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (Global.Emulator.HasSavestates())
|
||||
{
|
||||
if (GlobalWin.Tools.TAStudio != null)
|
||||
if (GlobalWin.Tools.Has<TAStudio>())
|
||||
{
|
||||
GlobalWin.Tools.TAStudio.BookMarkControl.SelectBranchExternal(num);
|
||||
return;
|
||||
|
@ -1888,7 +1888,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
return;
|
||||
}
|
||||
|
||||
if (GlobalWin.Tools.TAStudio != null)
|
||||
if (GlobalWin.Tools.Has<TAStudio>())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -1924,7 +1924,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
return;
|
||||
}
|
||||
|
||||
if (GlobalWin.Tools.TAStudio != null)
|
||||
if (GlobalWin.Tools.Has<TAStudio>())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -2193,7 +2193,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (Global.Emulator.HasSavestates())
|
||||
{
|
||||
if (GlobalWin.Tools.TAStudio != null)
|
||||
if (GlobalWin.Tools.Has<TAStudio>())
|
||||
{
|
||||
GlobalWin.Tools.TAStudio.BookMarkControl.SelectBranchExternal(false);
|
||||
return;
|
||||
|
@ -2221,7 +2221,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (Global.Emulator.HasSavestates())
|
||||
{
|
||||
if (GlobalWin.Tools.TAStudio != null)
|
||||
if (GlobalWin.Tools.Has<TAStudio>())
|
||||
{
|
||||
GlobalWin.Tools.TAStudio.BookMarkControl.SelectBranchExternal(true);
|
||||
return;
|
||||
|
@ -2713,7 +2713,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
return;
|
||||
}
|
||||
|
||||
if (GlobalWin.Tools.TAStudio != null)
|
||||
if (GlobalWin.Tools.Has<TAStudio>())
|
||||
{
|
||||
GlobalWin.Tools.TAStudio.BookMarkControl.LoadBranchExternal();
|
||||
return;
|
||||
|
@ -2761,7 +2761,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
return;
|
||||
}
|
||||
|
||||
if (GlobalWin.Tools.TAStudio != null)
|
||||
if (GlobalWin.Tools.Has<TAStudio>())
|
||||
{
|
||||
GlobalWin.Tools.TAStudio.BookMarkControl.LoadBranchExternal(SlotToInt(quickSlotName));
|
||||
return;
|
||||
|
@ -2785,7 +2785,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
return;
|
||||
}
|
||||
|
||||
if (GlobalWin.Tools.TAStudio != null)
|
||||
if (GlobalWin.Tools.Has<TAStudio>())
|
||||
{
|
||||
GlobalWin.Tools.TAStudio.BookMarkControl.UpdateBranchExternal();
|
||||
return;
|
||||
|
@ -3726,7 +3726,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
return;
|
||||
}
|
||||
|
||||
if (GlobalWin.Tools.TAStudio != null)
|
||||
if (GlobalWin.Tools.Has<TAStudio>())
|
||||
{
|
||||
GlobalWin.Tools.TAStudio.BookMarkControl.UpdateBranchExternal(SlotToInt(quickSlotName));
|
||||
return;
|
||||
|
|
|
@ -188,6 +188,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
Movie.CurrentBranch = index;
|
||||
LoadBranch(SelectedBranch);
|
||||
BranchView.Refresh();
|
||||
GlobalWin.OSD.AddMessage("Loaded branch " + Movie.CurrentBranch.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -203,12 +204,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void AddBranchToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Branch();
|
||||
GlobalWin.OSD.AddMessage("Added branch " + Movie.CurrentBranch.ToString());
|
||||
}
|
||||
|
||||
private void AddBranchWithTexToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Branch();
|
||||
EditBranchTextPopUp(Movie.CurrentBranch);
|
||||
GlobalWin.OSD.AddMessage("Added branch " + Movie.CurrentBranch.ToString());
|
||||
}
|
||||
|
||||
private void LoadBranchToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -222,6 +225,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
Movie.CurrentBranch = BranchView.SelectedRows.First();
|
||||
UpdateBranch(SelectedBranch);
|
||||
GlobalWin.OSD.AddMessage("Saved branch " + Movie.CurrentBranch.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -231,6 +235,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
int index = BranchView.SelectedRows.First();
|
||||
EditBranchTextPopUp(index);
|
||||
GlobalWin.OSD.AddMessage("Edited branch " + index.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -259,6 +264,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
//BranchView.Refresh();
|
||||
Tastudio.RefreshDialog();
|
||||
GlobalWin.OSD.AddMessage("Removed branch " + index.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -279,6 +285,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
else
|
||||
{
|
||||
NonExistentBranchMessage(slot);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -295,6 +302,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
else
|
||||
{
|
||||
NonExistentBranchMessage(slot);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -313,6 +321,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
BranchView.SelectRow(slot, true);
|
||||
BranchView.Refresh();
|
||||
}
|
||||
else
|
||||
{
|
||||
NonExistentBranchMessage(slot);
|
||||
}
|
||||
}
|
||||
|
||||
public void SelectBranchExternal(bool next)
|
||||
|
@ -343,6 +355,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
BranchView.Refresh();
|
||||
}
|
||||
|
||||
public void NonExistentBranchMessage(int slot)
|
||||
{
|
||||
string binding = Global.Config.HotkeyBindings.Where(x => x.DisplayName == "Add Branch").FirstOrDefault().Bindings;
|
||||
GlobalWin.OSD.AddMessage("Branch " + slot.ToString() + " does not exist");
|
||||
GlobalWin.OSD.AddMessage("Use " + binding + " to add branches");
|
||||
}
|
||||
|
||||
public void UpdateValues()
|
||||
{
|
||||
BranchView.RowCount = Movie.BranchCount;
|
||||
|
|
Loading…
Reference in New Issue