added basic image ui module
This commit is contained in:
@@ -1,19 +1,22 @@
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using RhythmBullet.Zer01HD.UI.Book;
|
||||
using RhythmBullet.Zer01HD.Utilities.ContentSystem;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RhythmBullet.Zer01HD.Game.Screens.MainMenu
|
||||
{
|
||||
internal class MainPage : Page
|
||||
{
|
||||
Texture2D title;
|
||||
internal MainPage(ContentSystem assets, GraphicsDevice graphicsDevice) : base(0, 0, graphicsDevice)
|
||||
{
|
||||
assets.Get<Texture2D>("title");
|
||||
title = assets.Get<Texture2D>("title");
|
||||
}
|
||||
|
||||
public override void Draw(SpriteBatch batch)
|
||||
{
|
||||
batch.Draw(title, title.Bounds, Color.White);
|
||||
base.Draw(batch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
26
RhythmBullet/Zer01HD/Utilities/UI/Modular/Modules/Image.cs
Normal file
26
RhythmBullet/Zer01HD/Utilities/UI/Modular/Modules/Image.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using RhythmBullet.Zer01HD.UI.Modular;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RhythmBullet.Zer01HD.Utilities.UI.Modular.Modules
|
||||
{
|
||||
class Image : UIModule
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
public Image(Texture2D texture)
|
||||
{
|
||||
this.texture = texture;
|
||||
}
|
||||
|
||||
public override void Draw(SpriteBatch batch)
|
||||
{
|
||||
batch.Draw(texture, Bounds, Color);
|
||||
base.Draw(batch);
|
||||
}
|
||||
}
|
||||
}
|
@@ -7,7 +7,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RhythmBullet.Zer01HD.UI.Modular
|
||||
namespace RhythmBullet.Zer01HD.UI.Modular.Modules
|
||||
{
|
||||
public class Text : UIModule
|
||||
{
|
Reference in New Issue
Block a user