From 714df8b092cb42237df119b471136a5af247dbba Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 2 Apr 2019 16:34:56 +0200 Subject: [PATCH] cc_draw.cpp: use random colors for CCDraw_debug For better distinguish objects on screen while debugging. --- src/gui/components/cc_draw.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/components/cc_draw.cpp b/src/gui/components/cc_draw.cpp index b2c57e3fd..83f9ad600 100644 --- a/src/gui/components/cc_draw.cpp +++ b/src/gui/components/cc_draw.cpp @@ -565,8 +565,7 @@ void CCDraw::paintFbItems(bool do_save_bg) frameBuffer->paintBackgroundBoxRel(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy); v_fbdata[i].is_painted = true; if (CCDraw_debug) - frameBuffer->paintBoxFrame(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, 1, COL_RED); - continue; + frameBuffer->paintBoxFrame(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, 1, COL_RANDOM); } } if (fbtype == CC_FBDATA_TYPE_SHADOW_BOX && ((!is_painted || !v_fbdata[i].is_painted)|| shadow_force || force_paint_bg)) { @@ -701,7 +700,7 @@ void CCDraw::paintFbItems(bool do_save_bg) } } if (CCDraw_debug) - frameBuffer->paintBoxFrame(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, 1, COL_RED); + frameBuffer->paintBoxFrame(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, 1, getRandomColor({255, 255}, {1,255}, {1, 255})); } //set is_painted attribut. if any layer was painted set it to true;