MacroInput - less global, cleanup
This commit is contained in:
parent
897bc0572e
commit
87cd264ed2
|
@ -18,88 +18,81 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
for (int i = 0; i < def.FloatControls.Count; i++)
|
for (int i = 0; i < def.FloatControls.Count; i++)
|
||||||
{
|
{
|
||||||
CheckBox box = new CheckBox();
|
CheckBox box = new CheckBox {Text = def.FloatControls[i]};
|
||||||
box.Text = def.FloatControls[i];
|
|
||||||
_buttonBoxes[i] = box;
|
_buttonBoxes[i] = box;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < def.BoolButtons.Count; i++)
|
for (int i = 0; i < def.BoolButtons.Count; i++)
|
||||||
{
|
{
|
||||||
CheckBox box = new CheckBox();
|
CheckBox box = new CheckBox {Text = def.BoolButtons[i]};
|
||||||
box.Text = def.BoolButtons[i];
|
|
||||||
_buttonBoxes[i + def.FloatControls.Count] = box;
|
_buttonBoxes[i + def.FloatControls.Count] = box;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < _buttonBoxes.Length; i++)
|
foreach (var box in _buttonBoxes)
|
||||||
{
|
{
|
||||||
_buttonBoxes[i].Parent = this;
|
box.Parent = this;
|
||||||
_buttonBoxes[i].AutoSize = true;
|
box.AutoSize = true;
|
||||||
_buttonBoxes[i].Checked = true;
|
box.Checked = true;
|
||||||
_buttonBoxes[i].CheckedChanged += ButtonBox_CheckedChanged;
|
box.CheckedChanged += ButtonBox_CheckedChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
PositionBoxes();
|
PositionBoxes();
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool _setting = false;
|
|
||||||
private void ButtonBox_CheckedChanged(object sender, EventArgs e)
|
private void ButtonBox_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (selectedZone == null || _setting)
|
if (SelectedZone == null)
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CheckBox s = sender as CheckBox;
|
CheckBox s = (CheckBox)sender;
|
||||||
s.ForeColor = s.Checked ? SystemColors.ControlText : SystemColors.ButtonShadow;
|
s.ForeColor = s.Checked ? SystemColors.ControlText : SystemColors.ButtonShadow;
|
||||||
s.Refresh();
|
s.Refresh();
|
||||||
|
|
||||||
// Update the selected zone's key
|
// Update the selected zone's key
|
||||||
var lg = Global.MovieSession.LogGeneratorInstance() as Bk2LogEntryGenerator;
|
var lg = (Bk2LogEntryGenerator)Global.MovieSession.LogGeneratorInstance();
|
||||||
lg.SetSource(Global.MovieSession.MovieControllerAdapter);
|
lg.SetSource(Global.MovieSession.MovieControllerAdapter);
|
||||||
string key = lg.GenerateLogKey();
|
string key = lg.GenerateLogKey();
|
||||||
key = key.Replace("LogKey:", "").Replace("#", "");
|
key = key.Replace("LogKey:", "").Replace("#", "");
|
||||||
|
|
||||||
for (int i = 0; i < _buttonBoxes.Length; i++)
|
foreach (var box in _buttonBoxes)
|
||||||
{
|
{
|
||||||
if (!_buttonBoxes[i].Checked)
|
if (!box.Checked)
|
||||||
key = key.Replace($"{_buttonBoxes[i].Text}|", "");
|
{
|
||||||
|
key = key.Replace($"{box.Text}|", "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
key = key.Substring(0, key.Length - 1);
|
key = key.Substring(0, key.Length - 1);
|
||||||
|
|
||||||
selectedZone.InputKey = key;
|
SelectedZone.InputKey = key;
|
||||||
}
|
|
||||||
private void SetButtonBoxes()
|
|
||||||
{
|
|
||||||
if (selectedZone == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
_setting = true;
|
|
||||||
for (int i = 0; i < _buttonBoxes.Length; i++)
|
|
||||||
_buttonBoxes[i].Checked = selectedZone.InputKey.Contains(_buttonBoxes[i].Text);
|
|
||||||
_setting = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PositionBoxes()
|
private void PositionBoxes()
|
||||||
{
|
{
|
||||||
int X = this.ClientSize.Width - 3;
|
int x = ClientSize.Width - 3;
|
||||||
int Y = this.ClientSize.Height - _buttonBoxes[0].Height - 3;
|
int y = ClientSize.Height - _buttonBoxes[0].Height - 3;
|
||||||
|
|
||||||
for (int i = _buttonBoxes.Length - 1; i >= 0; i--)
|
for (int i = _buttonBoxes.Length - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
X -= _buttonBoxes[i].Width;
|
x -= _buttonBoxes[i].Width;
|
||||||
if (X <= 3)
|
if (x <= 3)
|
||||||
{
|
{
|
||||||
X = this.ClientSize.Width - 3 - _buttonBoxes[i].Width;
|
x = ClientSize.Width - 3 - _buttonBoxes[i].Width;
|
||||||
Y -= (_buttonBoxes[0].Height + 6);
|
y -= (_buttonBoxes[0].Height + 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
_buttonBoxes[i].Location = new Point(X, Y);
|
_buttonBoxes[i].Location = new Point(x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void MacroInputTool_Resize(object sender, EventArgs e)
|
private void MacroInputTool_Resize(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (_initializing)
|
if (_initializing)
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
PositionBoxes();
|
PositionBoxes();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -82,14 +82,14 @@
|
||||||
this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
|
this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
|
||||||
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(170, 22);
|
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(170, 22);
|
||||||
this.saveAsToolStripMenuItem.Text = "Save Selected As...";
|
this.saveAsToolStripMenuItem.Text = "Save Selected As...";
|
||||||
this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.saveAsToolStripMenuItem_Click);
|
this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.SaveAsToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// loadMacroToolStripMenuItem
|
// loadMacroToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.loadMacroToolStripMenuItem.Name = "loadMacroToolStripMenuItem";
|
this.loadMacroToolStripMenuItem.Name = "loadMacroToolStripMenuItem";
|
||||||
this.loadMacroToolStripMenuItem.Size = new System.Drawing.Size(170, 22);
|
this.loadMacroToolStripMenuItem.Size = new System.Drawing.Size(170, 22);
|
||||||
this.loadMacroToolStripMenuItem.Text = "Load Macro...";
|
this.loadMacroToolStripMenuItem.Text = "Load Macro...";
|
||||||
this.loadMacroToolStripMenuItem.Click += new System.EventHandler(this.loadMacroToolStripMenuItem_Click);
|
this.loadMacroToolStripMenuItem.Click += new System.EventHandler(this.LoadMacroToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// RecentToolStripMenuItem
|
// RecentToolStripMenuItem
|
||||||
//
|
//
|
||||||
|
@ -127,7 +127,7 @@
|
||||||
this.NameTextbox.Size = new System.Drawing.Size(99, 20);
|
this.NameTextbox.Size = new System.Drawing.Size(99, 20);
|
||||||
this.NameTextbox.TabIndex = 4;
|
this.NameTextbox.TabIndex = 4;
|
||||||
this.NameTextbox.Text = "Zone 0";
|
this.NameTextbox.Text = "Zone 0";
|
||||||
this.NameTextbox.TextChanged += new System.EventHandler(this.NameTextbox_TextChanged);
|
this.NameTextbox.TextChanged += new System.EventHandler(this.NameTextBox_TextChanged);
|
||||||
//
|
//
|
||||||
// ReplaceBox
|
// ReplaceBox
|
||||||
//
|
//
|
||||||
|
|
|
@ -11,21 +11,21 @@ using BizHawk.Client.EmuHawk.ToolExtensions;
|
||||||
namespace BizHawk.Client.EmuHawk
|
namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
[Tool(false, null)]
|
[Tool(false, null)]
|
||||||
public partial class MacroInputTool : Form, IToolFormAutoConfig
|
public partial class MacroInputTool : ToolFormBase, IToolFormAutoConfig
|
||||||
{
|
{
|
||||||
[RequiredService]
|
[RequiredService]
|
||||||
private IEmulator Emulator { get; set; }
|
private IEmulator Emulator { get; set; }
|
||||||
|
|
||||||
private readonly List<MovieZone> _zones = new List<MovieZone>();
|
private readonly List<MovieZone> _zones = new List<MovieZone>();
|
||||||
private readonly List<int> _unsavedZones = new List<int>();
|
private readonly List<int> _unsavedZones = new List<int>();
|
||||||
private bool _selecting = false;
|
private bool _selecting;
|
||||||
|
|
||||||
private IMovie CurrentMovie => Global.MovieSession.Movie;
|
private IMovie CurrentMovie => Global.MovieSession.Movie;
|
||||||
|
|
||||||
// Still need to make sure the user can't load and use macros that
|
// Still need to make sure the user can't load and use macros that
|
||||||
// have options only available for TasMovie
|
// have options only available for TasMovie
|
||||||
|
|
||||||
private bool _initializing = false;
|
private bool _initializing;
|
||||||
public MacroInputTool()
|
public MacroInputTool()
|
||||||
{
|
{
|
||||||
_initializing = true;
|
_initializing = true;
|
||||||
|
@ -36,7 +36,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
// Movie recording must be active (check TAStudio because opening a project re-loads the ROM,
|
// Movie recording must be active (check TAStudio because opening a project re-loads the ROM,
|
||||||
// which resets tools before the movie session becomes active)
|
// which resets tools before the movie session becomes active)
|
||||||
if (!Global.MovieSession.Movie.IsActive() && !GlobalWin.Tools.IsLoaded<TAStudio>())
|
if (!CurrentMovie.IsActive() && !Tools.IsLoaded<TAStudio>())
|
||||||
{
|
{
|
||||||
MessageBox.Show("In order to use this tool you must be recording a movie.");
|
MessageBox.Show("In order to use this tool you must be recording a movie.");
|
||||||
Close();
|
Close();
|
||||||
|
@ -101,10 +101,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool UpdateBefore
|
public bool UpdateBefore => true;
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool AskSaveChanges()
|
public bool AskSaveChanges()
|
||||||
{
|
{
|
||||||
|
@ -112,22 +109,21 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
DialogResult result = MessageBox.Show("You have unsaved macro(s). Do you wish to save them?", "Save?", MessageBoxButtons.YesNoCancel);
|
||||||
|
if (result == DialogResult.Cancel)
|
||||||
{
|
{
|
||||||
DialogResult result = MessageBox.Show("You have unsaved macro(s). Do you wish to save them?", "Save?", MessageBoxButtons.YesNoCancel);
|
return false;
|
||||||
if (result == DialogResult.Cancel)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if (result == DialogResult.No)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < _unsavedZones.Count; i++)
|
if (result == DialogResult.No)
|
||||||
{
|
{
|
||||||
SaveMacroAs(_zones[_unsavedZones[i]]);
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var zone in _unsavedZones)
|
||||||
|
{
|
||||||
|
SaveMacroAs(_zones[zone]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -146,81 +142,72 @@ namespace BizHawk.Client.EmuHawk
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var newZone = new MovieZone(CurrentMovie, (int)StartNum.Value, (int)(EndNum.Value - StartNum.Value + 1));
|
var newZone = new MovieZone(CurrentMovie, (int) StartNum.Value, (int) (EndNum.Value - StartNum.Value + 1))
|
||||||
newZone.Name = $"Zone {_zones.Count}";
|
{
|
||||||
|
Name = $"Zone {_zones.Count}"
|
||||||
|
};
|
||||||
_zones.Add(newZone);
|
_zones.Add(newZone);
|
||||||
ZonesList.Items.Add($"{newZone.Name} - length: {newZone.Length}");
|
ZonesList.Items.Add($"{newZone.Name} - length: {newZone.Length}");
|
||||||
|
|
||||||
_unsavedZones.Add(ZonesList.Items.Count - 1);
|
_unsavedZones.Add(ZonesList.Items.Count - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private MovieZone selectedZone
|
private MovieZone SelectedZone => ZonesList.SelectedIndex == -1 ? null : _zones[ZonesList.SelectedIndex];
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (ZonesList.SelectedIndex == -1)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return _zones[ZonesList.SelectedIndex];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ZonesList_SelectedIndexChanged(object sender, EventArgs e)
|
private void ZonesList_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (selectedZone == null)
|
if (SelectedZone == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_selecting = true;
|
_selecting = true;
|
||||||
PlaceNum.Value = selectedZone.Start;
|
PlaceNum.Value = SelectedZone.Start;
|
||||||
ReplaceBox.Checked = selectedZone.Replace;
|
ReplaceBox.Checked = SelectedZone.Replace;
|
||||||
NameTextbox.Text = selectedZone.Name;
|
NameTextbox.Text = SelectedZone.Name;
|
||||||
OverlayBox.Checked = selectedZone.Overlay;
|
OverlayBox.Checked = SelectedZone.Overlay;
|
||||||
_selecting = false;
|
_selecting = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NameTextbox_TextChanged(object sender, EventArgs e)
|
private void NameTextBox_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (selectedZone == null || _selecting)
|
if (SelectedZone == null || _selecting)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
selectedZone.Name = NameTextbox.Text;
|
SelectedZone.Name = NameTextbox.Text;
|
||||||
ZonesList.Items[ZonesList.SelectedIndex] = $"{selectedZone.Name} - length: {selectedZone.Length}";
|
ZonesList.Items[ZonesList.SelectedIndex] = $"{SelectedZone.Name} - length: {SelectedZone.Length}";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PlaceNum_ValueChanged(object sender, EventArgs e)
|
private void PlaceNum_ValueChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (selectedZone == null || _selecting)
|
if (SelectedZone == null || _selecting)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
selectedZone.Start = (int)PlaceNum.Value;
|
SelectedZone.Start = (int)PlaceNum.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ReplaceBox_CheckedChanged(object sender, EventArgs e)
|
private void ReplaceBox_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (selectedZone == null || _selecting)
|
if (SelectedZone == null || _selecting)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
selectedZone.Replace = ReplaceBox.Checked;
|
SelectedZone.Replace = ReplaceBox.Checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OverlayBox_CheckedChanged(object sender, EventArgs e)
|
private void OverlayBox_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (selectedZone == null || _selecting)
|
if (SelectedZone == null || _selecting)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
selectedZone.Overlay = OverlayBox.Checked;
|
SelectedZone.Overlay = OverlayBox.Checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CurrentButton_Click(object sender, EventArgs e)
|
private void CurrentButton_Click(object sender, EventArgs e)
|
||||||
|
@ -230,34 +217,34 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private void PlaceZoneButton_Click(object sender, EventArgs e)
|
private void PlaceZoneButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (selectedZone == null)
|
if (SelectedZone == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(CurrentMovie is TasMovie))
|
if (!(CurrentMovie is TasMovie))
|
||||||
{
|
{
|
||||||
selectedZone.Start = Emulator.Frame;
|
SelectedZone.Start = Emulator.Frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
selectedZone.PlaceZone(CurrentMovie);
|
SelectedZone.PlaceZone(CurrentMovie);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Menu Items
|
#region Menu Items
|
||||||
|
|
||||||
private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
|
private void SaveAsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (selectedZone == null)
|
if (SelectedZone == null)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Please select a zone first.");
|
MessageBox.Show("Please select a zone first.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SaveMacroAs(selectedZone))
|
if (SaveMacroAs(SelectedZone))
|
||||||
_unsavedZones.Remove(ZonesList.SelectedIndex);
|
_unsavedZones.Remove(ZonesList.SelectedIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadMacroToolStripMenuItem_Click(object sender, EventArgs e)
|
private void LoadMacroToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
MovieZone loadZone = LoadMacro();
|
MovieZone loadZone = LoadMacro();
|
||||||
if (loadZone != null)
|
if (loadZone != null)
|
||||||
|
@ -278,7 +265,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
RecentToolStripMenuItem.DropDownItems.Clear();
|
RecentToolStripMenuItem.DropDownItems.Clear();
|
||||||
RecentToolStripMenuItem.DropDownItems.AddRange(
|
RecentToolStripMenuItem.DropDownItems.AddRange(
|
||||||
Global.Config.RecentMacros.RecentMenu(DummyLoadMacro, true));
|
Config.RecentMacros.RecentMenu(DummyLoadMacro, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DummyLoadMacro(string path)
|
private void DummyLoadMacro(string path)
|
||||||
|
@ -288,16 +275,16 @@ namespace BizHawk.Client.EmuHawk
|
||||||
ZonesList.Items.Add($"{loadZone.Name} - length: {loadZone.Length}");
|
ZonesList.Items.Add($"{loadZone.Name} - length: {loadZone.Length}");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string SuggestedFolder()
|
private string SuggestedFolder()
|
||||||
{
|
{
|
||||||
return PathManager.MakeAbsolutePath(Path.Combine(
|
return PathManager.MakeAbsolutePath(Path.Combine(
|
||||||
Global.Config.PathEntries["Global", "Macros"].Path,
|
Config.PathEntries["Global", "Macros"].Path,
|
||||||
PathManager.FilesystemSafeName(Global.Game)), null);
|
PathManager.FilesystemSafeName(Global.Game)), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public static bool SaveMacroAs(MovieZone macro)
|
public bool SaveMacroAs(MovieZone macro)
|
||||||
{
|
{
|
||||||
using var dialog = new SaveFileDialog
|
using var dialog = new SaveFileDialog
|
||||||
{
|
{
|
||||||
|
@ -326,12 +313,12 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
|
|
||||||
macro.Save(dialog.FileName);
|
macro.Save(dialog.FileName);
|
||||||
Global.Config.RecentMacros.Add(dialog.FileName);
|
Config.RecentMacros.Add(dialog.FileName);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MovieZone LoadMacro()
|
public MovieZone LoadMacro()
|
||||||
{
|
{
|
||||||
using var dialog = new OpenFileDialog
|
using var dialog = new OpenFileDialog
|
||||||
{
|
{
|
||||||
|
@ -345,7 +332,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Global.Config.RecentMacros.Add(dialog.FileName);
|
Config.RecentMacros.Add(dialog.FileName);
|
||||||
return new MovieZone(dialog.FileName);
|
return new MovieZone(dialog.FileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -243,7 +243,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
TasView.FirstSelectedIndex ?? 0,
|
TasView.FirstSelectedIndex ?? 0,
|
||||||
TasView.LastSelectedIndex ?? 0 - TasView.FirstSelectedIndex ?? 0 + 1);
|
TasView.LastSelectedIndex ?? 0 - TasView.FirstSelectedIndex ?? 0 + 1);
|
||||||
|
|
||||||
MacroInputTool.SaveMacroAs(macro);
|
new MacroInputTool().SaveMacroAs(macro);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PlaceMacroAtSelectionMenuItem_Click(object sender, EventArgs e)
|
private void PlaceMacroAtSelectionMenuItem_Click(object sender, EventArgs e)
|
||||||
|
@ -253,7 +253,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var macro = MacroInputTool.LoadMacro();
|
var macro = new MacroInputTool().LoadMacro();
|
||||||
if (macro != null)
|
if (macro != null)
|
||||||
{
|
{
|
||||||
macro.Start = TasView.FirstSelectedIndex ?? 0;
|
macro.Start = TasView.FirstSelectedIndex ?? 0;
|
||||||
|
|
Loading…
Reference in New Issue