Example #1
0
 /// <summary>
 /// LoadContent will be called once per game and is the place to load
 /// all of your content.
 /// </summary>
 protected override void LoadContent()
 {
     spriteBatch  = new SpriteBatch(GraphicsDevice);
     pixelTexture = new Texture2D(GraphicsDevice, 1, 1);
     pixelTexture.SetData(new Color[] { Color.White });
     transparencyTexture = Content.Load <Texture2D> ("gfx/transparency");
     editorCursorTexture = Content.Load <Texture2D>("gfx/editorCursors");
     editorCursor        = new Cursor(new TextureAtlas(editorCursorTexture));
     texturePanel        = new TexturePanel(transparencyTexture, pixelTexture, new Rectangle(0, graphics.GraphicsDevice.Viewport.Height - 192, graphics.GraphicsDevice.Viewport.Width, 192), editorCursor, graphics.GraphicsDevice.Viewport.Height);
     editor = new Editor(texturePanel, editorCursor);
 }
Example #2
0
        public Editor(TexturePanel texPanel, Cursor cursor)
        {
            Controls = new ArrayList <UIControl>();
            TexPanel = texPanel;

            // gotta changet this. Can't be adding every single sub control to the list
            Controls.Add(TexPanel);
            Controls.Add(TexPanel.HBorder);

            EditorCursor          = cursor;
            EditorCursor.Controls = Controls;
        }