public LoadingScreen(SizeF size, SizeF maxSize)
        {
            loadWindow = new ImageWindow("Window/LoadWindow");
            loadWindow.Position = new PointF(0, 0);
            loadWindow.MaximumSize = maxSize;
            loadWindow.Colors = new ColorRect(ColorEx.Black);
            loadWindow.Size = size;

            Texture texture = TextureManager.Instance.Load("loadscreen.dds");
            TextureAtlas atlas = new TextureAtlas("_glue", texture);
            atlas.DefineImage("LoadImage1", new PointF(0, 0), new SizeF(1024, 768));

            loadWindow.VerticalFormat = VerticalImageFormat.Stretched;
            loadWindow.HorizontalFormat = HorizontalImageFormat.Stretched;
            loadWindow.SetImage(atlas.GetTextureInfo("LoadImage1"));
            loadWindow.Visible = true;
        }
 /// <summary>
 ///   Set the cursor.  Lower priority cursors have precedent.
 ///   Setting the texture to null will clear that priority level
 ///   of cursor, allowing lower priority curors (higher value) to
 ///   be active.
 /// </summary>
 /// <param name="priority"></param>
 /// <param name="texture"></param>
 public static void SetCursor(int priority, string texture)
 {
     TextureAtlas imageset = null;
     TextureInfo image = null;
     ImageWindow cursor = null;
     if (texture != null) {
         UiSystem.GetImage(texture, out imageset, out image);
         cursor = new ImageWindow("_cursor_" + priority);
         cursor.SetImage(image);
         // Make sure we have the size of the mouse cursor set.
         cursor.Size = new SizeF(32, 32);
     }
     while (cursors.Count <= priority)
         cursors.Add(null);
     cursors[priority] = cursor;
     RestoreCursor();
 }