diff --git a/PartiAppen/PartiAppen/Content/Content.mgcb b/PartiAppen/PartiAppen/Content/Content.mgcb index 3395927..03a1ce2 100644 --- a/PartiAppen/PartiAppen/Content/Content.mgcb +++ b/PartiAppen/PartiAppen/Content/Content.mgcb @@ -20,6 +20,13 @@ /processorParam:TextureFormat=Compressed /build:Fonts/Main.spritefont +#begin Fonts/Small.spritefont +/importer:FontDescriptionImporter +/processor:FontDescriptionProcessor +/processorParam:PremultiplyAlpha=True +/processorParam:TextureFormat=Compressed +/build:Fonts/Small.spritefont + #begin Fonts/Sub.spritefont /importer:FontDescriptionImporter /processor:FontDescriptionProcessor diff --git a/PartiAppen/PartiAppen/Content/Fonts/Small.spritefont b/PartiAppen/PartiAppen/Content/Fonts/Small.spritefont new file mode 100644 index 0000000..4625dcb --- /dev/null +++ b/PartiAppen/PartiAppen/Content/Fonts/Small.spritefont @@ -0,0 +1,60 @@ + + + + + + + Roboto-bold + + + 6 + + + 0 + + + true + + + + + + + + + + + + Ϥ + + + + diff --git a/PartiAppen/PartiAppen/MenuManager.cs b/PartiAppen/PartiAppen/MenuManager.cs index 70cef03..61957ab 100644 --- a/PartiAppen/PartiAppen/MenuManager.cs +++ b/PartiAppen/PartiAppen/MenuManager.cs @@ -35,6 +35,9 @@ public Menues State public int MenuesAmount => Enum.GetNames(typeof(Menues)).Length; + // A variable for resetting the scroll + int scrollReturn; + // Create menu pages Menu menu = new Menu(Enum.GetNames(typeof(Menues)).Length); @@ -47,6 +50,8 @@ public void LoadMenu(ContentManager content) SpriteFont titleFont = content.Load(@"Fonts/Title"); SpriteFont subFont = content.Load(@"Fonts/Sub"); SpriteFont textFont = content.Load(@"Fonts/Text"); + SpriteFont smallFont = content.Load(@"Fonts/Small"); + // Color theme Color primary = new Color(3,169,244), primaryLight = new Color(103,218,255), primaryDark = new Color(0,122,193); @@ -197,6 +202,8 @@ public void LoadMenu(ContentManager content) #endregion + menu.Pages[(int)Menues.Program].AddText(titleFont, new Vector2(720/2, -100), true, "*DAB*", Color.Black); + menu.Pages[(int)Menues.Program].AddImageButton(new ImageButton(backArrowWhite, new Rectangle(new Point(720/2-45, yOffSet + 1800), new Point(80)), logoBlue, logoYellow, () => SetMenuState(Menues.Menu))); @@ -230,12 +237,23 @@ public void LoadMenu(ContentManager content) + "Anton Gunnarsson & " + System.Environment.NewLine + "Arvid Rimmerfors", Color.Black); - menu.Pages[(int)Menues.OmOss].AddImageButton(new ImageButton(backArrowWhite, new Rectangle(new Point(720 / 2 - 45, 920), new Point(80)), logoBlue, logoYellow, () => SetMenuState(Menues.Menu))); - #endregion #region Press + menu.Pages[(int)Menues.Press].AddText(titleFont, new Vector2(720 / 2, 80), true, "Press", Color.Black); + + menu.Pages[(int)Menues.Press].AddText(subFont, new Vector2(720 / 2, 200), true, "Musik", Color.Black); + menu.Pages[(int)Menues.Press].AddText(textFont, new Vector2(720 / 2, 240), true, "shorturl.at/foyVX", Color.Black); + + + menu.Pages[(int)Menues.Press].AddText(subFont, new Vector2(720 / 2, 340), true, "Logo", Color.Black); + menu.Pages[(int)Menues.Press].AddText(textFont, new Vector2(720 / 2, 380), true, "shorturl.at/lnxKR", Color.Black); + + + menu.Pages[(int)Menues.Press].AddText(smallFont, new Vector2(5, 1065), false, "*DAB*", Color.Black); + + #endregion } @@ -269,7 +287,14 @@ public void Update() break; case Menues.Program: // move camera - Game1.camera.Position = new Vector2(Game1.camera.Position.X, Game1.camera.Position.Y + (deltaScroll * scrollMultiplier)); + if (Game1.camera.Position.Y < -100) + { + scrollReturn++; + } + else if (Game1.camera.Position.Y < 0) + scrollReturn = 2; + else scrollReturn = 0; + Game1.camera.Position = new Vector2(Game1.camera.Position.X, MathHelper.Clamp(Game1.camera.Position.Y + scrollReturn + (deltaScroll * scrollMultiplier), -200, 1000) ); break; case Menues.OmOss: // reset camera