public override void Initialize() { //Calling Assets fade = new Texture2D(Globals.graphics.GraphicsDevice, 1, 1, false, SurfaceFormat.Color); //blank texture fade.SetData <Color>(new Color[] { Color.Black }); font = Globals.content.Load <SpriteFont>("smallfont"); Play = new SceneButton("Play", "start_button", new Vector2(600, 600), new Rectangle(1070, 630, 200, 60)); Back = new SceneButton("Back", "back_button", new Vector2(100, 600), new Rectangle(10, 630, 200, 60)); scenebuttons = new SceneButton[2] { Play, Back }; BottomBar = Globals.content.Load <Texture2D>("BottomBar"); Songs = new HashSet <SongButton>(); int i = 0; int x, y, w, h; //makes song buttons out of folders foreach (String folder in Directory.GetDirectories(Options.SongFolder)) { w = Options.Resolutions.X * 1 / 5; h = (Options.Resolutions.Y * 9 / 10 - 30) * 12 / 45; x = Options.Resolutions.X / 20 + (w + Options.Resolutions.X / 30) * (i / 3); y = Options.Resolutions.Y / 20 + (h + Options.Resolutions.Y / 45) * (i % 3); Rectangle rect = new Rectangle(x, y, w, h); Songs.Add(new SongButton(rect, folder)); i++; Width = (x + w + (double)Options.Resolutions.X / 5) / (double)Options.Resolutions.X; } songbar = new SceneSlider(new Rectangle(1, Options.Resolutions.Y * 4 / 5, Options.Resolutions.X - 2, 20), Width); songbar.scrollable = true; }
/// <summary> /// Perform any scene specific initialization. /// </summary> public override void Initialize() { font = Globals.content.Load <SpriteFont>("NewSpriteFont"); logo = Globals.content.Load <Texture2D>("models/Logo"); bloomSelectButton = new SceneButton("Folder Select", "folder_button", new Vector2(1020, 620), new Rectangle(1020, 620, 260, 110)); backButton = new SceneButton("Back", "back_button", new Vector2(0, 650), new Rectangle(0, 650, 200, 80)); bgDimSlider = new SceneSlider("BG Dim", new Rectangle(340, 280, 300, 50), 5, Options.BackgroundDim); globalVolumeSlider = new SceneSlider("Global Volume", new Rectangle(340, 380, 300, 50), 5, Options.Volumes.GlobalVolume);//need to start at .5 since the actualy values start at .5 sfxVolumeSlider = new SceneSlider("SFX Volume", new Rectangle(340, 480, 300, 50), 5, Options.Volumes.SoundFXVolume); musicVolumeSlider = new SceneSlider("Music Volume", new Rectangle(340, 580, 300, 50), 5, Options.Volumes.MusicVolume); sceneButtons = new SceneButton[2] { bloomSelectButton, backButton }; sceneSliders = new SceneSlider[4] { bgDimSlider, globalVolumeSlider, sfxVolumeSlider, musicVolumeSlider }; }
/// <summary> /// Perform any scene specific initialization. /// </summary> public override void Initialize() { font = Globals.content.Load<SpriteFont>("NewSpriteFont"); logo = Globals.content.Load<Texture2D>("models/Logo"); bloomSelectButton = new SceneButton("Folder Select", "folder_button", new Vector2(1020, 620),new Rectangle(1020,620,260,110)); backButton = new SceneButton("Back", "back_button", new Vector2(0,650), new Rectangle(0, 650, 200, 80)); bgDimSlider = new SceneSlider("BG Dim", new Rectangle(340, 280, 300, 50), 5,Options.BackgroundDim); globalVolumeSlider = new SceneSlider("Global Volume", new Rectangle(340, 380, 300, 50), 5,Options.Volumes.GlobalVolume);//need to start at .5 since the actualy values start at .5 sfxVolumeSlider = new SceneSlider("SFX Volume", new Rectangle(340, 480, 300, 50), 5,Options.Volumes.SoundFXVolume); musicVolumeSlider = new SceneSlider("Music Volume", new Rectangle(340, 580, 300, 50), 5,Options.Volumes.MusicVolume); sceneButtons = new SceneButton[2] { bloomSelectButton, backButton }; sceneSliders = new SceneSlider[4] { bgDimSlider, globalVolumeSlider, sfxVolumeSlider, musicVolumeSlider }; }
public override void Initialize() { //Calling Assets fade = new Texture2D(Globals.graphics.GraphicsDevice, 1, 1, false, SurfaceFormat.Color);//blank texture fade.SetData<Color>(new Color[] { Color.Black }); font = Globals.content.Load<SpriteFont>("smallfont"); Play = new SceneButton("Play", "start_button", new Vector2(600, 600), new Rectangle(1070,630,200,60)); Back = new SceneButton("Back", "back_button", new Vector2(100, 600), new Rectangle(10,630,200,60)); scenebuttons = new SceneButton[2] {Play,Back}; BottomBar = Globals.content.Load<Texture2D>("BottomBar"); Songs = new HashSet<SongButton>(); int i = 0; int x, y, w, h; //makes song buttons out of folders foreach (String folder in Directory.GetDirectories(Options.SongFolder)) { w=Options.Resolutions.X*1/5; h=(Options.Resolutions.Y*9/10-30)*12/45; x=Options.Resolutions.X/20+(w+Options.Resolutions.X/30)*(i/3); y=Options.Resolutions.Y/20+(h+Options.Resolutions.Y/45)*(i%3); Rectangle rect = new Rectangle(x, y, w, h); Songs.Add(new SongButton(rect,folder)); i++; Width = (x + w + (double)Options.Resolutions.X/5) / (double)Options.Resolutions.X; } songbar = new SceneSlider(new Rectangle(1, Options.Resolutions.Y*4/5, Options.Resolutions.X-2, 20), Width); songbar.scrollable = true; }