@@ -306,7 +306,7 @@ namespace
306306 template <> constexpr auto draw_text<const char *> = &al_draw_text;
307307 template <> constexpr auto draw_text<const ALLEGRO_USTR*> = &al_draw_ustr;
308308
309- void draw_border (const ALLEGRO_FONT* font, ALLEGRO_COLOR color , float x, float y, int flags, auto ustr)
309+ void draw_color_border (const ALLEGRO_FONT* font, ALLEGRO_COLOR text_color, ALLEGRO_COLOR border_color , float x, float y, int flags, auto ustr)
310310 {
311311 using T = decltype (ustr);
312312 int xx = 0 ;
@@ -321,8 +321,13 @@ namespace
321321 else if (flags & ALLEGRO_ALIGN_RIGHT) {
322322 xx -= ww;
323323 }
324- al_draw_filled_rectangle (x + xx, y, x + xx + ww, y + hh, al_map_rgba_f (0.0 , 0.0 , 0.0 , 0.75 ));
325- draw_text<T>(font, color, x, y, flags, ustr);
324+ al_draw_filled_rectangle (x + xx, y, x + xx + ww, y + hh, border_color);
325+ draw_text<T>(font, text_color, x, y, flags, ustr);
326+ }
327+
328+ void draw_border (const ALLEGRO_FONT* font, ALLEGRO_COLOR color, float x, float y, int flags, auto ustr)
329+ {
330+ draw_color_border (font, color, al_map_rgba_f (0.0 , 0.0 , 0.0 , 0.75 ), x, y, flags, ustr);
326331 }
327332}
328333
@@ -336,6 +341,16 @@ void draw_ustr_border(const ALLEGRO_FONT *font, ALLEGRO_COLOR color, float x, fl
336341 draw_border (font, color, x, y, flags, ustr);
337342}
338343
344+ void draw_color_text_border (const ALLEGRO_FONT* font, ALLEGRO_COLOR text_color, ALLEGRO_COLOR border_color, float x, float y, int flags, const char * ustr)
345+ {
346+ draw_color_border (font, text_color, border_color, x, y, flags, ustr);
347+ }
348+
349+ void draw_color_ustr_border (const ALLEGRO_FONT* font, ALLEGRO_COLOR text_color, ALLEGRO_COLOR border_color, float x, float y, int flags, const ALLEGRO_USTR* ustr)
350+ {
351+ draw_color_border (font, text_color, border_color, x, y, flags, ustr);
352+ }
353+
339354namespace
340355{
341356 void draw_report_border (const ALLEGRO_FONT* font, float x, float y, int flags, const df::report* report)
0 commit comments