protected override void prepareContent(ContentManager content) { texBackground = content.Load <Texture2D>("Images/splashBackground"); texLogo = content.Load <Texture2D>("Images/logo"); texLogoLight = content.Load <Texture2D>("Images/logoLight"); texPharaoh = content.Load <Texture2D>("Images/pharaohSkull"); texFlash = content.Load <Texture2D>("Images/whiteScreen"); texTitle = content.Load <Texture2D>("Images/title"); texTitleMask = content.Load <Texture2D>("Images/titleMask"); texTitleLight = content.Load <Texture2D>("Images/titleLight"); texMusic = content.Load <Texture2D>("Images/btnMusic"); texSound = content.Load <Texture2D>("Images/btnSound"); texVersionFree = content.Load <Texture2D>("Images/versionFree"); texVersionPremium = content.Load <Texture2D>("Images/versionPremium"); fntAncient = content.Load <SpriteFont>("Fonts/ancientLarge"); sndThunder = content.Load <SoundEffect>("Sounds/thunder"); SoundController.GetInstance().SetBackgroundMusic(content.Load <Song>("Musics/menu")); vtLogoCenter = new Vector2(texLogo.Width / 2, texLogo.Height / 2); vtPharaohCenter = new Vector2(texPharaoh.Width / 2, 154); int touchLeft = 400 - (int)Main.FontNormal.MeasureString(Localize.Instance.TouchToContinue).X / 2; vtTouch = new Vector2(touchLeft, 380); uiDialog = new UIDialog(content); }
protected override void prepareContent(ContentManager content) { texBackground = content.Load <Texture2D>("Images/splashBackground"); texPharaoh = content.Load <Texture2D>("Images/pharaohSkull"); texEmpty = content.Load <Texture2D>("Images/empty"); texHowToPlay = content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/pageHowToPlay"); texCredits = content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/pageCredits"); texSidebarClassic = content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/sidebarClassic"); texSidebarAdventure = content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/sidebarAdventure"); texMusic = content.Load <Texture2D>("Images/btnMusic"); texSound = content.Load <Texture2D>("Images/btnSound"); //menu items texMenuItem = new Dictionary <int, Texture2D[][]>(); texMenuItem.Add(FLAG_MAIN, new Texture2D[][] { new Texture2D[] { content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/mnuQuickPlay"), content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/mnuQuickPlayLight") }, new Texture2D[] { content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/mnuAdventure"), content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/mnuAdventureLight") }, new Texture2D[] { content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/mnuInstruction"), content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/mnuInstructionLight") }, new Texture2D[] { content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/mnuLeaderboard"), content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/mnuLeaderboardLight") } }); texMenuItem.Add(FLAG_INSTRUCTION, new Texture2D[][] { new Texture2D[] { content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/mnuHowToPlay"), content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/mnuHowToPlayLight") }, new Texture2D[] { content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/mnuTutorial"), content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/mnuTutorialLight") }, new Texture2D[] { content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/mnuAbout"), content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/mnuAboutLight") }, new Texture2D[] { content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/mnuMore"), content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/mnuMoreLight") } }); vtPharaohCenter = new Vector2(texPharaoh.Width / 2, 154); vtPharaoh = new Vector2(800 / 2 - 18 * 20, 480 / 2); vtSidebar = new Vector2(800, 0); SoundController.GetInstance().SetBackgroundMusic(content.Load <Song>("Musics/menu")); SoundController.GetInstance().Play(); confirmDialog = new UIDialog(content); gameMode = GameMode.Classic; }
protected override void prepareContent(ContentManager content) { texLeaderboardBackground = content.Load <Texture2D>("Images/leaderboardBackground"); texLeaderboardForeground = content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/leaderboardForeground"); texLeaderboardSubmit = content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/leaderboardSubmit"); texWhiteScreen = content.Load <Texture2D>("Images/whiteScreen"); btnSubmit = new Button2D(content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/btnSubmitLight"), null, null, new Vector2(450, 380)); btnSubmit.FadeAtActive = true; btnSubmit.Visible = true; sprLoading = new Sprite2D(content.Load <Texture2D>("Images/loading"), 60, 60); sprLoading.SetPosition(274, 210); uiDialog = new UIDialog(content); strRank = Localize.Instance.FetchingRank; vtRank = new Vector2(400 - Main.FontSmall.MeasureString(strRank).X / 2, 70); strView7 = new StringBuilder(Localize.Instance.FetchingData); vTargetLeft = 134; vtView7 = new Vector2(26, vTargetLeft); strViewAll = new StringBuilder(Localize.Instance.FetchingData); vTargetRight = 134; vtViewAll = new Vector2(422, vTargetRight); }
public QuickMenu(PlayScene parent) { _parent = parent; ContentManager content = Main.Instance.Content; texMenu = content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/quickMenu"); texBackground = content.Load <Texture2D>("Images/whiteScreen"); vtMenu = new Vector2(0, 480); //nut reset maze btnReset = new Button2D( content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/qmnuResetMazeLight") ); btnReset.Position = (Localize.Instance.Language == Language.English) ? new Vector2(157, 347) : new Vector2(172, 343); //nut get solution btnSolution = new Button2D( content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/qmnuGetSolutionLight") ); btnSolution.Position = (Localize.Instance.Language == Language.English) ? new Vector2(427, 347) : new Vector2(458, 343); //nut abandon btnAbandon = new Button2D( content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/qmnuAbandonLight") ); btnAbandon.Position = (Localize.Instance.Language == Language.English) ? new Vector2(179, 422) : new Vector2(177, 417); //nut main menu btnMain = new Button2D( content.Load <Texture2D>("Images/" + Localize.Instance.LanguageCode + "/qmnuMainMenuLight") ); btnMain.Position = (Localize.Instance.Language == Language.English) ? new Vector2(436, 422) : new Vector2(440, 417); _backgroundAlpha = 0; _state = QuickMenuState.Hide; confirmDialog = new UIDialog(content); recMusic = new Rectangle(531, 132 + 480, 60, 60); recSound = new Rectangle(624, 132 + 480, 60, 60); }