Updated text button to use new centering setup. Also minor refactor.
This commit is contained in:
@@ -35,6 +35,7 @@ namespace RecrownedAthenaeum.UI.Modular.Modules.Interactive
|
||||
{
|
||||
this.text = new Text(font, text);
|
||||
this.text.autoScale = true;
|
||||
this.text.centered = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -49,6 +50,7 @@ namespace RecrownedAthenaeum.UI.Modular.Modules.Interactive
|
||||
TextButtonSkinDefinition skinDefinition = skin.ObtainDefinition<TextButtonSkinDefinition>(definitionName);
|
||||
this.text = new Text(font, text);
|
||||
this.text.autoScale = true;
|
||||
this.text.centered = true;
|
||||
FontColor = skin.GetColor(skinDefinition.fontColor);
|
||||
}
|
||||
|
||||
@@ -76,7 +78,6 @@ namespace RecrownedAthenaeum.UI.Modular.Modules.Interactive
|
||||
{
|
||||
text.bounds = bounds;
|
||||
text.Update(gameTime);
|
||||
text.CenterIn(TrueBounds);
|
||||
base.Update(gameTime);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user