Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-02-09 08:24:36 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-02-09 08:24:36 +0300
commit7086b371b2a2e55c3ab0b1861929acfb23ad0bed (patch)
tree33d98ca43ed679d23c495fc170699eb46652ade5 /NesMenuCollection.cs
parent7bd3f9ccccbd52496c063b03564c2d5ee8458454 (diff)
Should work now. Need to test, test, test.
Diffstat (limited to 'NesMenuCollection.cs')
-rw-r--r--NesMenuCollection.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/NesMenuCollection.cs b/NesMenuCollection.cs
index ddbc8408..f2238eca 100644
--- a/NesMenuCollection.cs
+++ b/NesMenuCollection.cs
@@ -214,6 +214,23 @@ namespace com.clusterrr.hakchi_gui
this.RemoveAll(o => oldElements.Contains(o));
}
+ public void AddBack(List<NesMenuCollection> ignore = null)
+ {
+ if (ignore == null)
+ ignore = new List<NesMenuCollection>();
+ ignore.Add(this);
+ foreach (NesMenuFolder item in from i in this where i is NesMenuFolder select i)
+ {
+ if (ignore.Contains(item.ChildMenuCollection))
+ continue;
+ var back = new NesMenuFolder(Resources.FolderNameBack, "folder_back");
+ back.Position = NesMenuFolder.Priority.Back;
+ back.ChildMenuCollection = this;
+ item.ChildMenuCollection.AddBack(ignore);
+ item.ChildMenuCollection.Add(back);
+ }
+ }
+
void TrimFolderNames(NesMenuCollection nesMenuCollection)
{
const int minChars = 3;