Exemple #1
0
        //
        // Summary:
        //     Called when the component needs to load graphics resources.  Override to
        //     load any component specific graphics resources.
        //
        // Parameters:
        //   loadAllContent:
        //     true if all graphics resources need to be loaded;false if only manual resources
        //     need to be loaded.
        protected override void LoadContent()
        {
            if (scoring && prompt != null)
            {
                prompt.LoadContent(game);
            }
            SpriteBatch = new SpriteBatch(game.Graphics.Device);
            foreach (MenupartDescription i in menuXml.MenuParts)
            {
                if (i.Name.Equals(CurrentMenu))
                {
                    background = game.Content.Load <Texture2D>("Content\\Textures\\Menu\\" + i.BackgroundImage);
                    mouse      = game.Content.Load <Texture2D>("Content\\Textures\\Menu\\" + i.Mouse);
                }
            }

            textfield = game.Content.Load <Texture2D>("Content\\Textures\\Menu\\" + "Textfield");
            CurrentList.LoadContent();
            font = game.Content.Load <SpriteFont>("Arial");
            red  = game.Content.Load <Texture2D>("Content\\Textures\\Menu\\" + "3dmousered");
            if (prompt != null)
            {
                prompt.LoadContent(game);
            }
            if (HighscoreMenu != null && HighscoreMenu.Visiblity)
            {
                HighscoreMenu.LoadContent();
            }
            if (OptionMenu != null && OptionMenu.Visiblity)
            {
                OptionMenu.LoadContent();
            }
        }
Exemple #2
0
 /// <summary>
 /// Called when the component needs to load graphics resources.  Override to
 /// load any component specific graphics resources.
 /// </summary>
 /// <parameters>
 /// loadAllContent:
 ///    true if all graphics resources need to be loaded;false if only manual resources
 ///    need to be loaded.
 /// </parameters>
 protected override void LoadContent()
 {
     SpriteBatch = new SpriteBatch(game.Graphics.Device);
     background  = game.Content.Load <Texture2D>("Content\\Textures\\Profils\\" + BildXml.BackgroundImage);
     textfield   = game.Content.Load <Texture2D>("Content\\Textures\\Profils\\" + BildXml.TextFieldImage);
     mouse       = game.Content.Load <Texture2D>("Content\\Textures\\" + BildXml.Mouse);
     CurrentList.LoadContent();
     font                = game.Content.Load <SpriteFont>("Arial");
     font.Spacing        = 0f;
     marker              = game.Content.Load <Texture2D>("Content\\Textures\\Profils\\" + BildXml.Marker);
     textback            = game.Content.Load <Texture2D>("Content\\Textures\\Profils\\" + BildXml.Textback);
     buttonback          = game.Content.Load <Texture2D>("Content\\Textures\\Profils\\" + BildXml.buttonBackground);
     buttonbackbarCreate = game.Content.Load <Texture2D>("Content\\Textures\\Profils\\" + BildXml.barCreate);
     buttonbackbarDelete = game.Content.Load <Texture2D>("Content\\Textures\\Profils\\" + BildXml.barDelete);
     buttonbackbarOk     = game.Content.Load <Texture2D>("Content\\Textures\\Profils\\" + BildXml.barOk);
 }