From 7d7491feb41bc9724bf63bef545b996226406889 Mon Sep 17 00:00:00 2001 From: Treeki Date: Sun, 13 Feb 2011 16:22:11 +0100 Subject: really messy code for materials/textures which KINDA works --- NW4RTools/Util/IOrderedDictionary.cs | 3 +++ NW4RTools/Util/OrderedDictionary.cs | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'NW4RTools/Util') diff --git a/NW4RTools/Util/IOrderedDictionary.cs b/NW4RTools/Util/IOrderedDictionary.cs index a574c7c..6cf9b85 100644 --- a/NW4RTools/Util/IOrderedDictionary.cs +++ b/NW4RTools/Util/IOrderedDictionary.cs @@ -55,5 +55,8 @@ namespace NW4RTools.Util get; set; } + + + TKey GetKeyForIndex(int index); } } diff --git a/NW4RTools/Util/OrderedDictionary.cs b/NW4RTools/Util/OrderedDictionary.cs index 3dd4fb4..98e523a 100644 --- a/NW4RTools/Util/OrderedDictionary.cs +++ b/NW4RTools/Util/OrderedDictionary.cs @@ -162,11 +162,15 @@ namespace NW4RTools.Util return List.GetEnumerator(); } - IEnumerator> IEnumerable>.GetEnumerator() + IEnumerator> IEnumerable>.GetEnumerator() { return List.GetEnumerator(); } + public TKey GetKeyForIndex(int index) { + return List[index].Key; + } + /// /// Inserts a new entry into the OrderedDictionary<TKey,TValue> collection with the specified key and value at the specified index. /// -- cgit v1.2.3