ui
This commit is contained in:
parent
de62568872
commit
50edd04b14
5 changed files with 20 additions and 6 deletions
|
@ -41,6 +41,18 @@
|
|||
/processorParam:TextureFormat=Compressed
|
||||
/build:Font2.spritefont
|
||||
|
||||
#begin menuFon.jpg
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:menuFon.jpg
|
||||
|
||||
#begin PC_Computer_Dangerous_Dave_In_The_Haunted_Mansion_Death_Sequences.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
|
|
BIN
DangerousD/Content/menuFon.jpg
Normal file
BIN
DangerousD/Content/menuFon.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 197 KiB |
|
@ -26,7 +26,7 @@ public abstract class AbstractGui : IDrawableObject
|
|||
|
||||
public virtual void LoadContent()
|
||||
{
|
||||
Manager.LoadContent(AppManager.Instance.Content, "Font");
|
||||
Manager.LoadContent(AppManager.Instance.Content, "Font2");
|
||||
}
|
||||
|
||||
public virtual void Update(GameTime gameTime)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using DangerousD.GameCore.Managers;
|
||||
using Microsoft.Xna.Framework;
|
||||
using MonogameLibrary.UI.Base;
|
||||
using MonogameLibrary.UI.Elements;
|
||||
using System.Diagnostics;
|
||||
|
||||
|
@ -11,10 +12,11 @@ internal class MenuGUI : AbstractGui
|
|||
{
|
||||
int wigth = AppManager.Instance.Window.ClientBounds.Width;
|
||||
int height = AppManager.Instance.Window.ClientBounds.Height;
|
||||
|
||||
|
||||
Elements.Add(new Label(Manager) { rectangle = new Rectangle((wigth - 50) / 2 - 60, 30, 50, 50), text = "Dangerous", mainColor = Color.Transparent, scale = 0.7f, fontName = "Font2", fontColor = Color.White });
|
||||
Elements.Add(new Label(Manager) { rectangle = new Rectangle((wigth - 50) / 2 + 250, 60, 50, 50), text = "D", mainColor = Color.Transparent, scale = 1.2f, fontName = "Font2", fontColor = Color.White });
|
||||
var menuBackground = new DrawableUIElement(Manager) { rectangle = new Rectangle(0, 0, wigth, height), textureName = "menuFon" };
|
||||
Elements.Add(menuBackground);
|
||||
menuBackground.LoadTexture(AppManager.Instance.Content);
|
||||
Elements.Add(new Label(Manager) { rectangle = new Rectangle((wigth - 50) / 2 - 60, 60, 50, 50), text = "Dangerous", mainColor = Color.Transparent, scale = 0.7f, fontName = "Font2", fontColor = Color.White });
|
||||
Elements.Add(new Label(Manager) { rectangle = new Rectangle((wigth - 50) / 2 + 250, 90, 50, 50), text = "D", mainColor = Color.Transparent, scale = 1.2f, fontName = "Font2", fontColor = Color.White });
|
||||
var butSingle = new ButtonText(Manager) { rectangle = new Rectangle((wigth - 300) / 2, 130, 300, 50), text = "Singleplayer", fontName = "ButtonFont" };
|
||||
Elements.Add(butSingle);
|
||||
butSingle.LeftButtonPressed += () =>
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace MonogameLibrary.UI.Base
|
|||
protected Texture2D texture;
|
||||
protected int layerIndex;
|
||||
protected UIManager Manager;
|
||||
protected string textureName;
|
||||
public string textureName;
|
||||
public Rectangle rectangle = new Rectangle(0, 0, 10, 10);
|
||||
public Color mainColor = Color.White;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue