Example #1
0
        public override void LoadContent()
        {
            // Reload the content manager and loads up the ScreensSettings.xml for reading
            ContentManager Content = ScreenManager.Game.Content;
            scrConfig = Content.Load<ScreensConfig>("ScreensSettings");
            appConfig = Content.Load<ApplicationConfig>("ApplicationSettings");

            // Load screen parameters from the ScreensSettings.xml
            OpacityColor = Color.White;         // This can't be editable without writing a StringToColor database?
            ScreenTime = TimeSpan.FromSeconds(scrConfig.EngineSplash_Duration);
            Opacity = scrConfig.EngineSplash_Opacity;

            // Load the images for the background image and transition from ScreensSettings.xml
            BackgroundTexture = Content.Load<Texture2D>(scrConfig.EngineSplash_BGImage);
            Pixel = Content.Load<Texture2D>(scrConfig.Transition_BGImage);
        }
Example #2
0
        public override void LoadContent()
        {
            // Reload the content manager and loads up the ScreensSettings.xml for reading
            ContentManager Content = ScreenManager.Game.Content;
            scrConfig = Content.Load<ScreensConfig>("ScreensSettings");
            appConfig = Content.Load<ApplicationConfig>("ApplicationSettings");

            // Loads the menu titles.
            // #### Should be loading the array of items, then passing them through the MenuEntriesText function.
            MenuEntriesText.Add(scrConfig.Menuoptions01);
            MenuEntriesText.Add(scrConfig.Menuoptions02);
            MenuEntriesText.Add(scrConfig.Menuoptions03);
            MenuEntriesText.Add(scrConfig.Menuoptions04);
            MenuEntriesText.Add(scrConfig.Menuoptions05);

            // Works out how many items are in the list and then distances itself from the bottom.
            int menudistancebottom = (35 * MenuEntriesText.Count);
            int actualmenudistance = 720 - menudistancebottom;
            StartPosition = new Vector2(50, actualmenudistance);

            backgroundTexture = Content.Load<Texture2D>(scrConfig.MainMenu_BGImage);
            MenuText = Content.Load<SpriteFont>(scrConfig.MenuFont);

            // Load the UI elements
            kootenay10Font = Content.Load<SpriteFont>("Fonts\\titlemenufont");
            base.LoadContent();
        }