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); // 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(); }
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"); // Load screen parameters from the ScreensSettings.xml OpacityColor = Color.White; // This can't be editable without writing a StringToColor database? ScreenTime = TimeSpan.FromSeconds(scrConfig.UniversitySplash_Duration); Opacity = scrConfig.UniversitySplash_Opacity; // Load the images for the background image and transition from ScreensSettings.xml BackgroundTexture = Content.Load <Texture2D>(scrConfig.UniversitySplash_BGImage); Pixel = Content.Load <Texture2D>(scrConfig.Transition_BGImage); }
public override void LoadContent() { ContentManager Content = ScreenManager.Game.Content; scrConfig = Content.Load <ScreensConfig>("ScreensSettings"); TransitionOnTime = TimeSpan.FromSeconds(scrConfig.ControllerDetect_TranOn); TransitionOffTime = TimeSpan.FromSeconds(scrConfig.ControllerDetect_TranOff); if (gamePadState.IsConnected) { backgroundTexture = Content.Load <Texture2D>(scrConfig.ControllerDetect_BGImage); buttonTexture = Content.Load <Texture2D>(scrConfig.ControllerDetect_360Image); } else { backgroundTexture = Content.Load <Texture2D>(scrConfig.ControllerDetect_BGImage); buttonTexture = Content.Load <Texture2D>(scrConfig.ControllerDetect_PCImage); } }