diff --git a/DangerousD/Content/Caveat-Bold.ttf b/DangerousD/Content/Caveat-Bold.ttf new file mode 100644 index 0000000..5b05296 Binary files /dev/null and b/DangerousD/Content/Caveat-Bold.ttf differ diff --git a/DangerousD/Content/Content.mgcb b/DangerousD/Content/Content.mgcb index 2c394eb..5a0551a 100644 --- a/DangerousD/Content/Content.mgcb +++ b/DangerousD/Content/Content.mgcb @@ -13,12 +13,19 @@ #---------------------------------- Content ---------------------------------# -#begin Font.spritefont +#begin File.spritefont /importer:FontDescriptionImporter /processor:FontDescriptionProcessor /processorParam:PremultiplyAlpha=True /processorParam:TextureFormat=Compressed -/build:Font.spritefont +/build:File.spritefont + +#begin Font_25.spritefont +/importer:FontDescriptionImporter +/processor:FontDescriptionProcessor +/processorParam:PremultiplyAlpha=True +/processorParam:TextureFormat=Compressed +/build:Font_25.spritefont #begin Font2.spritefont /importer:FontDescriptionImporter diff --git a/DangerousD/Content/File.spritefont b/DangerousD/Content/File.spritefont new file mode 100644 index 0000000..e38ede5 --- /dev/null +++ b/DangerousD/Content/File.spritefont @@ -0,0 +1,60 @@ + + + + + + + Handjet-ExtraLight.ttf + + + 70 + + + 0 + + + true + + + + + + + + + + + + ~ + + + + diff --git a/DangerousD/Content/Font.spritefont b/DangerousD/Content/Font_25.spritefont similarity index 99% rename from DangerousD/Content/Font.spritefont rename to DangerousD/Content/Font_25.spritefont index 4cffaf7..7c44e57 100644 --- a/DangerousD/Content/Font.spritefont +++ b/DangerousD/Content/Font_25.spritefont @@ -17,7 +17,7 @@ with. Size is a float value, measured in points. Modify this value to change the size of the font. --> - 12 + 25 + + + + + Arial + + + 30 + + + 0 + + + true + + + + + + + + + + + + ~ + + + а + я + + + + diff --git a/DangerousD/Content/Handjet-ExtraLight.ttf b/DangerousD/Content/Handjet-ExtraLight.ttf new file mode 100644 index 0000000..feda022 Binary files /dev/null and b/DangerousD/Content/Handjet-ExtraLight.ttf differ diff --git a/DangerousD/GameCore/GUI/MenuGUI.cs b/DangerousD/GameCore/GUI/MenuGUI.cs index f24437c..15dcd13 100644 --- a/DangerousD/GameCore/GUI/MenuGUI.cs +++ b/DangerousD/GameCore/GUI/MenuGUI.cs @@ -8,14 +8,31 @@ internal class MenuGUI : AbstractGui { protected override void CreateUI() { - Elements.Add(new CheckBox(Manager) { rectangle = new Rectangle(10, 10, 50, 50) }); - var but = new Button(Manager) { rectangle = new Rectangle(100, 10, 80, 50) }; - Elements.Add(but); - but.LeftButtonPressed += () => + int wigth = AppManager.Instance.Window.ClientBounds.Width; + int height = AppManager.Instance.Window.ClientBounds.Height; + var butSingle = new Button(Manager) { rectangle = new Rectangle((wigth - 300) / 2, 130, 300, 50), text = "Singleplayer", fontName = "File" }; + Elements.Add(butSingle); + butSingle.LeftButtonPressed += () => { AppManager.Instance.ChangeGameState(GameState.Game); }; - Elements.Add(new Button(Manager) { rectangle = new Rectangle(0, 10, 50, 50) }); - Elements.Add(new Label(Manager) { rectangle = new Rectangle(100, 10, 50, 50), text = "DA" }); + var butMulti = new Button(Manager) { rectangle = new Rectangle((wigth - 300) / 2, 190, 300, 50), text = "Multiplayer", fontName = "File" }; + Elements.Add(butMulti); + butMulti.LeftButtonPressed += () => + { + // открытие мультиплеера + }; + var butOption = new Button(Manager) { rectangle = new Rectangle((wigth - 300) / 2, 250, 300, 50), text = "Option", fontName = "File" }; + Elements.Add(butOption); + butOption.LeftButtonPressed += () => + { + // открытие настроек + }; + var butExit = new Button(Manager) { rectangle = new Rectangle((wigth - 300) / 2, 310, 300, 50), text = "Exit", fontName = "File" }; + Elements.Add(butExit); + butExit.LeftButtonPressed += () => + { + AppManager.Instance.Exit(); + }; } -} \ No newline at end of file +} \ No newline at end of file