예제 #1
0
 public LeaderboardsUI(UI parentUI)
 {
     Data                = new LeaderboardData(7);
     Box                 = BoxGraphic.Create(900, 50, Terraria.HowToPlay.Assets.TEXT_BACKGROUND, 8, ROW_COLOR);
     uiDelay             = 0;
     this.parentUI       = parentUI;
     SelectedLeaderboard = Leaderboard.DISTANCE;
 }
예제 #2
0
 public TextBlock(ref Rectangle dialogArea, CompiledText text, ref Rectangle textArea, Texture2D background, int borderWidth, Color backColor, Color textColor, Color accentColor)
 {
     this.background  = BoxGraphic.Create(dialogArea.Width, dialogArea.Height, background, borderWidth, backColor);
     dialogPosition   = new Vector2i(dialogArea.X, dialogArea.Y);
     this.text        = text;
     this.textArea    = textArea;
     isScrollable     = (text.Height > textArea.Height);
     minOffsetY       = (short)(-Math.Max(0, text.Height - textArea.Height));
     this.textColor   = textColor;
     this.accentColor = accentColor;
     textTexture      = null;
 }