clean to working state
This commit is contained in:
parent
9a0b74135a
commit
04f8fbd8cd
@ -53,7 +53,6 @@
|
|||||||
<Compile Include="Zer01HD\Utilities\Input\InputListener.cs" />
|
<Compile Include="Zer01HD\Utilities\Input\InputListener.cs" />
|
||||||
<Compile Include="Zer01HD\Utilities\Input\InputUtilities.cs" />
|
<Compile Include="Zer01HD\Utilities\Input\InputUtilities.cs" />
|
||||||
<Compile Include="Zer01HD\Utilities\Persistence\Preferences.cs" />
|
<Compile Include="Zer01HD\Utilities\Persistence\Preferences.cs" />
|
||||||
<Compile Include="Zer01HD\Utilities\Renderer\ScaledRenderer.cs" />
|
|
||||||
<Compile Include="Zer01HD\Utilities\UI\Interactive\BasicButton.cs" />
|
<Compile Include="Zer01HD\Utilities\UI\Interactive\BasicButton.cs" />
|
||||||
<Compile Include="Zer01HD\Utilities\UI\ScreenSystem\ITransition.cs" />
|
<Compile Include="Zer01HD\Utilities\UI\ScreenSystem\ITransition.cs" />
|
||||||
<Compile Include="Zer01HD\Utilities\UI\ScreenSystem\LoadingScreen.cs" />
|
<Compile Include="Zer01HD\Utilities\UI\ScreenSystem\LoadingScreen.cs" />
|
||||||
|
@ -12,6 +12,7 @@ namespace RhythmBullet.Zer01HD.UI.Modular
|
|||||||
{
|
{
|
||||||
private SpriteFont font;
|
private SpriteFont font;
|
||||||
private float scale;
|
private float scale;
|
||||||
|
private Vector2 position;
|
||||||
public string DisplayedText
|
public string DisplayedText
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -21,19 +22,21 @@ namespace RhythmBullet.Zer01HD.UI.Modular
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
Vector2 size = font.MeasureString(value);
|
Vector2 size = font.MeasureString(value);
|
||||||
Width = size.X;
|
Bounds.Width = (int) size.X;
|
||||||
scale = Height / size.Y;
|
scale = Bounds.Height / size.Y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public Text(string displayedText, SpriteFont font, int height)
|
public Text(string displayedText, SpriteFont font, int height)
|
||||||
{
|
{
|
||||||
|
Bounds.Height = height;
|
||||||
this.font = font;
|
this.font = font;
|
||||||
Height = height;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Draw(SpriteBatch batch)
|
public override void Draw(SpriteBatch batch)
|
||||||
{
|
{
|
||||||
batch.DrawString(font, DisplayedText, Position, Color);
|
position.X = Bounds.X;
|
||||||
|
position.Y = Bounds.Y;
|
||||||
|
batch.DrawString(font, DisplayedText, position, Color);
|
||||||
base.Draw(batch);
|
base.Draw(batch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user