Skip to content

Commit

Permalink
feat: show card count instead of 9+
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuscechetto committed Sep 3, 2024
1 parent 1da4b3e commit e4b9ba2
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public abstract class CardBarImageBuilder
protected static readonly Rect BoxRect = new Rect(183, 0, 34, 34);
protected static readonly Rect MulliganWinrateBoxRect = new Rect(136, 4, 54, 26);
protected static readonly Rect ImageRect = new Rect(83, 0, 134, 34);
protected static readonly Rect CountTextRect = new Rect(198, 0, double.NaN, 34);
protected static readonly Rect CountTextRect = new Rect(196, 0, 14, 34);
protected static readonly Rect CostTextRect = new Rect(0, 0, 34, 34);

protected static readonly Dictionary<ThemeElement, ThemeElementInfo> Required = new Dictionary<ThemeElement, ThemeElementInfo>
Expand Down Expand Up @@ -236,9 +236,7 @@ protected void AddCountText(Rect rect)
var count = Math.Abs(Card.Count);
if(count <= 1)
return;
AddText(Math.Min(count, 9), CountFontSize, rect, CountTextBrush, NumbersTypeFace);
if(count > 9)
AddText("+", 13, new Rect(rect.X + 5, 3, double.NaN, double.NaN), CountTextBrush, TextTypeFace);
AddText(count, CountFontSize, rect, CountTextBrush, NumbersTypeFace, centered: true);
}

protected virtual void AddMulliganWinRate()
Expand Down

0 comments on commit e4b9ba2

Please sign in to comment.