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()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            Graphics.Spritebatch = spriteBatch;
            Graphics.Font = Content.Load<SpriteFont>("Graphics/Fonts/Font");
            // TODO: use this.Content to load your game content here

            win = new WindowBase(0, 0, 300, 60);
            _skin = new MenuSkin();
            asp = new AnimatedSprite(TextureCache.LoadSystem("Window"), 0, 0, 16, 16, _skin[ESkinKeys.AnimArrowUp0], _skin[ESkinKeys.AnimArrowUp1], _skin[ESkinKeys.AnimArrowUp2], _skin[ESkinKeys.AnimArrowUp3]);
            asp.Visible = true;
        }
Example #2
0
        public MenuWindow(int x, int y, int w, int h, float openness=1)
        {
            _skin = new MenuSkin();
            _windowskin = TextureCache.LoadSystem("Window");

            _x = x;
            _y = y;
            _width = w;
            _height = h;

            _openness = openness;
            Visible = true;

            _contents = Graphics.Spritebatch;
            _bitmap = new RenderTarget2D(_contents.GraphicsDevice, w, h);
            _frame = new RenderTarget2D(_contents.GraphicsDevice, w, h);
            _arrows = new AnimatedSprite[4];
            SetArrows();
            
            Initialize();
            InitDraw();
        }