# HG changeset patch # User Wuzzy # Date 1554153318 -7200 # Node ID 123aaa2bf4b525585c397cce26f7f96443241875 # Parent 8563cc40fc1e8431984168a79d7d049915af9c89 Make dark clan colors visible in stats screen diff -r 8563cc40fc1e -r 123aaa2bf4b5 ChangeLog.txt --- a/ChangeLog.txt Mon Apr 01 22:07:42 2019 +0200 +++ b/ChangeLog.txt Mon Apr 01 23:15:18 2019 +0200 @@ -59,6 +59,7 @@ * Fix speech bubbles overlapping in the wrong order * Fix wrong ice beam angle if it goes diagonally up out of map through world wrap * Fix double water splash when flying saucer drowns + * Black clan color is now properly supported Game HUD: + Colorize switching arrows, pointing arrow and target cross in clan color diff -r 8563cc40fc1e -r 123aaa2bf4b5 QTfrontend/hwconsts.cpp.in --- a/QTfrontend/hwconsts.cpp.in Mon Apr 01 22:07:42 2019 +0200 +++ b/QTfrontend/hwconsts.cpp.in Mon Apr 01 23:15:18 2019 +0200 @@ -45,6 +45,7 @@ int cMaxTeams = 8; int cMaxHHs = HEDGEHOGS_PER_TEAM * cMaxTeams; int cMinServerVersion = 3; +unsigned char cInvertTextColorAt = 64; QString * cDefaultAmmoStore = new QString( AMMOLINE_DEFAULT_QT AMMOLINE_DEFAULT_PROB AMMOLINE_DEFAULT_DELAY AMMOLINE_DEFAULT_CRATE ); diff -r 8563cc40fc1e -r 123aaa2bf4b5 QTfrontend/hwconsts.h --- a/QTfrontend/hwconsts.h Mon Apr 01 22:07:42 2019 +0200 +++ b/QTfrontend/hwconsts.h Mon Apr 01 23:15:18 2019 +0200 @@ -39,6 +39,7 @@ extern int cMaxTeams; extern int cMaxHHs; extern int cMinServerVersion; +extern unsigned char cInvertTextColorAt; class QStandardItemModel; diff -r 8563cc40fc1e -r 123aaa2bf4b5 QTfrontend/ui/page/pagegamestats.cpp --- a/QTfrontend/ui/page/pagegamestats.cpp Mon Apr 01 22:07:42 2019 +0200 +++ b/QTfrontend/ui/page/pagegamestats.cpp Mon Apr 01 23:15:18 2019 +0200 @@ -222,11 +222,25 @@ minValue = qMin(minValue, hps[t]); } - QPen pen(c); + // Draw clan health/score graph lines + QColor col = QColor(c); + + // Special pen for very dark clan colors + if (!(col.red() >= cInvertTextColorAt || col.green() >= cInvertTextColorAt || col.blue() >= cInvertTextColorAt)) + { + QPen pen_marker(QColor(255, 255, 255)); + pen_marker.setWidth(3); + pen_marker.setStyle(Qt::DotLine); + pen_marker.setCosmetic(true); + m_scene->addPath(path, pen_marker); + } + + // Regular pen + QPen pen(col); pen.setWidth(2); pen.setCosmetic(true); + m_scene->addPath(path, pen); - m_scene->addPath(path, pen); ++i; }