aboutsummaryrefslogtreecommitdiffstatsci
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Interface.cs38
-rwxr-xr-xsrc/OpenTKGameWindow.cs13
2 files changed, 3 insertions, 48 deletions
diff --git a/src/Interface.cs b/src/Interface.cs
index 63160cf5..2fea548a 100644
--- a/src/Interface.cs
+++ b/src/Interface.cs
@@ -87,6 +87,7 @@ namespace go
}
return stream;
}
+
public static GraphicObject Load(string path, object hostClass = null)
{
string root = "Object";
@@ -112,42 +113,7 @@ namespace go
stream.Dispose ();
return tmp;
}
- public static void Load<T>(string file, out T result, object hostClass = null)
- {
- GOMLResolutionStack.Push(new List<DynAttribute>());
-
- XmlSerializerNamespaces xn = new XmlSerializerNamespaces();
- xn.Add("", "");
- XmlSerializer xs = new XmlSerializer(typeof(T));
-
- using (Stream s = new FileStream(file, FileMode.Open))
- {
- result = (T)xs.Deserialize(s);
- }
-
- if (hostClass == null)
- return;
-
- resolveGOML (hostClass);
-
-// while (Bindings.Count > 0) {
-// DynAttribute binding = Bindings [0];
-// Bindings.RemoveAt (0);
-// CompilerServices.ResolveBinding (binding, hostClass);
-// }
-// foreach (DynAttribute binding in Bindings) {
-//// Type tSource = binding.Source.GetType ();
-//// if (!tSource.GetInterfaces ().Any (i => i.Name == "IValueChange")){
-//// Debug.WriteLine ("Binding source does not implement IValueChange.");
-//// continue;
-//// }
-// //MemberInfo mi = binding.Source.GetType ().GetMember (binding.MemberName);
-// CompilerServices.CreateBinding (binding, hostClass);
-// }
-// Bindings.Clear ();
- }
-
- public static GraphicObject Load(Stream stream, Type type, object hostClass = null)
+ static GraphicObject Load(Stream stream, Type type, object hostClass = null)
{
GraphicObject result;
GOMLResolutionStack.Push(new List<DynAttribute>());
diff --git a/src/OpenTKGameWindow.cs b/src/OpenTKGameWindow.cs
index fa68cb89..355ae304 100755
--- a/src/OpenTKGameWindow.cs
+++ b/src/OpenTKGameWindow.cs
@@ -313,18 +313,6 @@ namespace go
#endregion
#region loading
- public void LoadInterface<T>(string path, out T result)
- {
- Interface.Load<T> (path, out result, this);
- AddWidget (result as GraphicObject);
- }
- public T LoadInterface<T> (string Path)
- {
- T result;
- Interface.Load<T> (Path, out result, this);
- AddWidget (result as GraphicObject);
- return result;
- }
public GraphicObject LoadInterface (string path)
{
GraphicObject tmp = Interface.Load (path, this);
@@ -340,6 +328,7 @@ namespace go
{
GL.Clear (ClearBufferMask.ColorBufferBit);
}
+
#region Game win overrides
protected override void OnUpdateFrame(FrameEventArgs e)
{