72{
73 int16_t xt, yt;
74 uint16_t wt, ht, prev_height = 0, prev_width = 0;
75 const int16_t block_width = 100;
76 const int16_t block_height = 50;
77
78
79 const char dummy_price[] = "USD 7.77777777";
80
81
84 display.setTextSize(1);
85
86
87 display.getTextBounds(F("Bitcoin"), 0, 0, &xt, &yt, &wt, &ht);
88 display.setCursor(x + 14, y + ht + 3);
89 display.print(ticker);
90
91 display.setFont(
font);
92
93 display.getTextBounds(dummy_price, 0, 0, &xt, &yt, &wt, &ht);
94 display.fillRoundRect(x + 5, y + 30, wt + 20, ht + 10, ht + 10,
secondary_color);
95 prev_width += x + 5 + wt + 20;
96 prev_height += y + 30;
97
98
100 display.getTextBounds(
price, 0, 0, &xt, &yt, &wt, &ht);
101 display.setCursor(5 + ((x + prev_width - wt) / 2), prev_height + ht + 4);
102 display.print(
price);
103 prev_width += 4;
104 prev_height += -2;
105
106
113 }
114 display.drawBitmap(prev_width, prev_height, arrow, 24, 24, color);
115 prev_width += 24;
116
117
119 display.getTextBounds(
change, 0, 0, &xt, &yt, &wt, &ht);
120 display.setCursor(prev_width - wt, y + ht + 3);
122}
const GFXfont * font_bold
char change[CRYPTO_MAX_CHANGE_LENGTH_STR]
char price[CRYPTO_MAX_PRICE_LENGTH_STR]
const unsigned char down_arrow_sml[72]
const unsigned char up_arrow_sml[72]