aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/OpenTKGameWindow.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2015-04-27 14:58:27 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2015-04-27 14:58:27 +0200
commit7b8ff62e3ee75e19d9eeeabd31bedef371215554 (patch)
treef58ee90791028768b69921841cd604e20a3a5c02 /src/OpenTKGameWindow.cs
parent79224ffe3efe06a99cb5dfb183f16a5427504b2a (diff)
Layouting queue
Diffstat (limited to 'src/OpenTKGameWindow.cs')
-rwxr-xr-xsrc/OpenTKGameWindow.cs27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/OpenTKGameWindow.cs b/src/OpenTKGameWindow.cs
index 644c65c8..2d491b20 100755
--- a/src/OpenTKGameWindow.cs
+++ b/src/OpenTKGameWindow.cs
@@ -78,6 +78,8 @@ namespace go
{
g.Parent = this;
GraphicObjects.Add (g);
+
+ g.RegisterForLayouting ();
}
public void DeleteWidget(GraphicObject g)
{
@@ -224,14 +226,18 @@ namespace go
GraphicObject[] invGOList = new GraphicObject[GraphicObjects.Count];
GraphicObjects.CopyTo (invGOList,0);
invGOList = invGOList.Reverse ().ToArray ();
-
- foreach (GraphicObject p in invGOList) {
- if (p.Visible) {
- layoutTime.Start ();
- while(!p.LayoutIsValid)
- p.UpdateLayout ();
- layoutTime.Stop ();
- }
+//
+// foreach (GraphicObject p in invGOList) {
+// if (p.Visible) {
+// layoutTime.Start ();
+// while(!p.LayoutIsValid)
+// p.UpdateLayout ();
+// layoutTime.Stop ();
+// }
+// }
+ while (Interface.LayoutingQueue.Count > 0) {
+ LayoutingQueueItem lqi = Interface.LayoutingQueue.Dequeue ();
+ lqi.ProcessLayouting ();
}
//Debug.WriteLine ("otd:" + gobjsToRedraw.Count.ToString () + "-");
@@ -457,6 +463,11 @@ namespace go
#region ILayoutable implementation
+ public void UpdateLayout (LayoutingType layoutType)
+ {
+ throw new NotImplementedException ();
+ }
+
public Rectangle ContextCoordinates (Rectangle r)
{
return r;