Some progress on recent roms menu
This commit is contained in:
parent
b03b5a6ec1
commit
2d5efc42cd
|
@ -166,6 +166,7 @@
|
|||
this.recentROMToolStripMenuItem.Name = "recentROMToolStripMenuItem";
|
||||
this.recentROMToolStripMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||
this.recentROMToolStripMenuItem.Text = "Recent ROM";
|
||||
this.recentROMToolStripMenuItem.DropDownOpened += new System.EventHandler(this.recentROMToolStripMenuItem_DropDownOpened);
|
||||
//
|
||||
// noneToolStripMenuItem
|
||||
//
|
||||
|
|
|
@ -352,6 +352,7 @@ namespace BizHawk.MultiClient
|
|||
var file = new FileInfo(ofd.FileName);
|
||||
Global.Config.LastRomPath = file.DirectoryName;
|
||||
LoadRom(file.FullName);
|
||||
RecentRoms.Add(file.FullName);
|
||||
}
|
||||
|
||||
private void toolStripMenuItem4_Click(object sender, EventArgs e) { SaveState("QuickSave1"); }
|
||||
|
@ -571,7 +572,6 @@ namespace BizHawk.MultiClient
|
|||
private void clearToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
RecentRoms.Clear();
|
||||
//TODO: clear out the recent menu? Or perhaps it should always be updated on menu open
|
||||
}
|
||||
|
||||
private void autoloadMostRecentToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -595,5 +595,27 @@ namespace BizHawk.MultiClient
|
|||
else
|
||||
autoloadMostRecentToolStripMenuItem.Checked = false;
|
||||
}
|
||||
|
||||
private void recentROMToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
//Clear out recent Roms list
|
||||
//repopulate it with an up to date list
|
||||
recentROMToolStripMenuItem.DropDownItems.Clear();
|
||||
if (RecentRoms.IsEmpty())
|
||||
{
|
||||
recentROMToolStripMenuItem.DropDownItems.Add("None");
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int x = 0; x < RecentRoms.Length(); x++)
|
||||
{
|
||||
recentROMToolStripMenuItem.DropDownItems.Add(RecentRoms.GetRecentFileByPosition(x));
|
||||
}
|
||||
}
|
||||
recentROMToolStripMenuItem.DropDownItems.Add("Clear");
|
||||
|
||||
//MenuItem recent1 = new MenuItem("test");
|
||||
//recentROMToolStripMenuItem.DropDownItems.Add("testme");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -29,6 +29,11 @@ namespace BizHawk.MultiClient
|
|||
return false;
|
||||
}
|
||||
|
||||
public int Length()
|
||||
{
|
||||
return recentlist.Count;
|
||||
}
|
||||
|
||||
public void Add(string newFile)
|
||||
{
|
||||
for (int x = 0; x < recentlist.Count; x++)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SoundEnabled True
|
||||
LastRomPath D:\lib\roms\Game Gear
|
||||
LastRomPath D:\TAS\adelikatTAS\Archive
|
||||
HardResetBinding LeftShift+Tab
|
||||
FastForwardBinding J1 B6
|
||||
RewindBinding J1 B5
|
||||
|
|
Loading…
Reference in New Issue