/// <summary>
/// Creates a new BestScore panel.
/// </summary>
/// <param name="y">The y of the new element.</param>
/// <param name="score">The score of the new element.</param>
/// <returns></returns>
public static StackPanel CreateBestScore(int y, int score)
{
var stackPanelScore = new StackPanel()
{
HorizontalAlignment = WaveEngine.Framework.UI.HorizontalAlignment.Center,
Orientation = WaveEngine.Components.UI.Orientation.Horizontal,
Margin = new Thickness(
0,
y,
0,
0)
};
var bestScoreText = new Image(WaveContent.Assets.Menus.best_score_png);
var bestScoreNumber = new TextBlock()
{
FontPath = WaveContent.Assets.Fonts.BadaBoom_BB_wpk,
Text = score.ToString(),
TextAlignment = WaveEngine.Components.UI.TextAlignment.Right,
Width = 50,
};
stackPanelScore.Add(bestScoreText);
stackPanelScore.Add(bestScoreNumber);
return stackPanelScore;
}