public FAQScreen( ScreenManager screenManager ) { ScreenManager = screenManager; IsPopup = true; TransitionOnTime = TimeSpan.FromSeconds( .25 ); TransitionOffTime = TimeSpan.FromSeconds( .25 ); faqText = "Q: Why don't I see any scores but mine?\n" + "A: It is possible no one is playing the game at the same time as you.\n" + " Avatar Hamster Panic cannot use Leaderboards and must share your scores\n" + " with people playing the game at the same time as you. The best scores of\n" + " others are shared and saved to your hard drive automatically for you.\n\n" + "Q: I'm playing at the same time with my friend but I don't see his/her scores.\n" + "A: Be patient. Because connections are done automatically, it may take some time\n" + " before you connect to your friends. It's also possible you are both having NAT\n" + " trouble. Please visit http://support.microsoft.com/kb/908880 for help in\n" + " resolving NAT issues.\n\n" + "Q: My friend's score didn't save when they signed in on a local profile.\n" + "A: Only Xbox LIVE members can save and share scores."; float ss = GameCore.Instance.GraphicsDevice.Viewport.Height / 1080f; ContentManager content = GameCore.Instance.Content; SpriteFont font = content.Load<SpriteFont>( "Fonts/FAQFont" ); Viewport viewport = GameCore.Instance.GraphicsDevice.Viewport; Vector2 center = new Vector2( viewport.Width / 2, viewport.Height / 2 - 30 * ss ); TextMenuItem item = new TextMenuItem( this, center, faqText, font ); item.TransitionOffPosition = center; item.TransitionOnPosition = center; item.Centered = true; item.Scale = ss; MenuItems.Add( item ); Rectangle safeRect = ScreenRects.SafeRegion; Vector2 backPos = new Vector2( safeRect.Left, safeRect.Bottom ); backPos.X = ( center.X - ss * item.Dimensions.X / 2 ); Texture2D backText = content.Load<Texture2D>( "Textures/bBackText" ); StaticImageMenuItem bBack = new StaticImageMenuItem( this, backPos, backText ); bBack.Origin.X = 0; bBack.SetImmediateScale( .5f * ss ); MenuItems.Add( bBack ); }
public SignInMenuScreen( ScreenManager screenManager ) { TransitionOnTime = TimeSpan.FromSeconds( 1 ); TransitionOffTime = TimeSpan.FromSeconds( .25 ); this.ScreenManager = screenManager; ContentManager content = screenManager.Game.Content; GraphicsDevice device = screenManager.GraphicsDevice; boxModel = content.Load<CustomModel>( "Models/signInBox" ); foreach ( CustomModel.ModelPart part in boxModel.ModelParts ) { part.Effect.CurrentTechnique = part.Effect.Techniques["Color"]; } camera = new Camera( MathHelper.PiOver4, device.Viewport.AspectRatio, 1, 100, new Vector3( 0, 0, 10 ), new Vector3( 0, 0, 0 ) ); StaticImageMenuItem item; Vector2 itemPosition; SpriteFont nameFont = content.Load<SpriteFont>( "Fonts/signInNameFont" ); Texture2D joinTexture = content.Load<Texture2D>( "Textures/aJoinText" ); Texture2D addCpuTexture = content.Load<Texture2D>( "Textures/xAddCPUText" ); Texture2D removeCpuTexture = content.Load<Texture2D>( "Textures/yRemoveCPUText" ); Texture2D aStartTexture = content.Load<Texture2D>( "Textures/aStartText" ); Texture2D readyTexture = content.Load<Texture2D>( "Textures/readyText" ); screenScale = device.Viewport.Height / 1080f; textScale *= screenScale; Rectangle rectangle = ScreenRects.FourByThree; float x = textColumnStart * (float)rectangle.Width + (float)rectangle.X; float xStep = (float)rectangle.Width * ( 1f - ( 2f * textColumnStart ) ) / 3f; float nameY = nameHeight * (float)rectangle.Height + (float)rectangle.Y; float joinY = joinHeight * (float)rectangle.Height + (float)rectangle.Y; float cpuY = cpuHeight * (float)rectangle.Height + (float)rectangle.Y; float readyY = readyHeight * (float)rectangle.Height + (float)rectangle.Y; // Full version required for multiplayer Vector2 nagPos = new Vector2( device.Viewport.Width / 2, device.Viewport.Height * .14f ); nagText = new TextMenuItem( this, nagPos, "Full version required for multiplayer.", nameFont ); nagText.TransitionOnPosition = nagPos; nagText.TransitionOffPosition = nagPos; nagText.Centered = true; nagText.Color = Color.DarkOrange; nagText.DeathBegin = .01f; MenuItems.Add( nagText ); for ( int i = 0; i < 4; ++i ) { // <GAMERTAG> itemPosition = new Vector2( x, nameY ); TextMenuItem textItem = new TextMenuItem( this, itemPosition, null, nameFont ); textItem.Centered = true; textItem.MaxWidth = xStep; textItem.Scale = screenScale; slots[i].NameItem = textItem; MenuItems.Add( textItem ); // A Join itemPosition = new Vector2( x, joinY ); item = new StaticImageMenuItem( this, itemPosition, joinTexture ); item.SetImmediateScale( textScale ); slots[i].JoinItem = item; MenuItems.Add( item ); // X Add CPU itemPosition = new Vector2( x, cpuY ); item = new StaticImageMenuItem( this, itemPosition, addCpuTexture ); item.SetImmediateScale( textScale ); slots[i].AddCPUItem = item; MenuItems.Add( item ); // Y Add CPU itemPosition = new Vector2( x, cpuY ); item = new StaticImageMenuItem( this, itemPosition, removeCpuTexture ); item.SetImmediateScale( textScale ); slots[i].RemoveCPUItem = item; MenuItems.Add( item ); // A Start itemPosition = new Vector2( x, readyY ); item = new StaticImageMenuItem( this, itemPosition, aStartTexture ); item.SetImmediateScale( textScale ); slots[i].StartItem = item; MenuItems.Add( item ); // Ready! itemPosition = new Vector2( x, readyY ); item = new StaticImageMenuItem( this, itemPosition, readyTexture ); item.SetImmediateScale( textScale ); slots[i].ReadyItem = item; MenuItems.Add( item ); x += xStep; } }
float ss; // screen scale #endregion Fields #region Constructors public CreditsMenuScreen( ScreenManager screenManager ) { ScreenManager = screenManager; ContentManager content = screenManager.Game.Content; ss = screenManager.Game.GraphicsDevice.Viewport.Height / 1080f; float scale = ss; TextMenuItem item; Vector2 position; string names; SpriteFont font = content.Load<SpriteFont>( "Fonts/menufont" ); Color headingColor = new Color( 255, 255, 100 ); Color nameColor = new Color( 225, 225, 225 ); // CREDITS title position = new Vector2( 80, 80 ) * ss; Texture2D image = content.Load<Texture2D>( "Textures/creditsTitleText" ); StaticImageMenuItem title = new StaticImageMenuItem( this, position, image ); title.Origin = Vector2.Zero; title.SetImmediateScale( scale ); title.TransitionOnPosition = position - new Vector2( 0, 100 ) * ss; title.TransitionOffPosition = position - new Vector2( 0, 100 ) * ss; MenuItems.Add( title ); // artwork position = new Vector2( 100, 220 ) * ss; item = new TextMenuItem( this, position, "Artwork", font ); item.Scale = scale; item.Color = headingColor; item.TransitionOnPosition = position - new Vector2( 200, 0 ) * ss; item.TransitionOffPosition = position - new Vector2( 200, 0 ) * ss; MenuItems.Add( item ); position = new Vector2( 100, 260 ) * ss; names = "Sabrina Sullivan\nBryce Garrison\nKristine Serio"; item = new TextMenuItem( this, position, names, font ); item.Scale = scale; item.Color = nameColor; item.TransitionOnPosition = position - new Vector2( 200, 0 ) * ss; item.TransitionOffPosition = position - new Vector2( 200, 0 ) * ss; MenuItems.Add( item ); // programming position = new Vector2( 100, 440 ) * ss; item = new TextMenuItem( this, position, "Programming", font ); item.Scale = scale; item.Color = headingColor; item.TransitionOnPosition = position - new Vector2( 200, 0 ) * ss; item.TransitionOffPosition = position - new Vector2( 200, 0 ) * ss; MenuItems.Add( item ); position = new Vector2( 100, 480 ) * ss; names = "Alex Serio"; item = new TextMenuItem( this, position, names, font ); item.Scale = scale; item.Color = nameColor; item.TransitionOnPosition = position - new Vector2( 200, 0 ) * ss; item.TransitionOffPosition = position - new Vector2( 200, 0 ) * ss; MenuItems.Add( item ); // special thanks position = new Vector2( 100, 600 ) * ss; item = new TextMenuItem( this, position, "Special Thanks", font ); item.Scale = scale; item.Color = headingColor; item.TransitionOnPosition = position - new Vector2( 200, 0 ) * ss; item.TransitionOffPosition = position - new Vector2( 200, 0 ) * ss; MenuItems.Add( item ); position = new Vector2( 100, 640 ) * ss; names = "Jace Sangco\nPaul Flores\nRoy Flores"; item = new TextMenuItem( this, position, names, font ); item.Scale = scale; item.Color = nameColor; item.TransitionOnPosition = position - new Vector2( 200, 0 ) * ss; item.TransitionOffPosition = position - new Vector2( 200, 0 ) * ss; MenuItems.Add( item ); //// sound effects //position = new Vector2( 100, 900 ) * ss; //string text = "Most sound effects from soundsnap.com.\nHigh Score component by Jon Watte."; //item = new TextMenuItem( this, position, text, font ); //item.TransitionOnPosition = position - new Vector2( 200, 0 ) * ss; //item.TransitionOffPosition = position - new Vector2( 200, 0 ) * ss; //item.Scale = .85f * scale; //MenuItems.Add( item ); }