From e799f76e5de9eaec9b29d94051ee1751135e9419 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 7 Oct 2019 00:10:42 +0200 Subject: [PATCH] rogueviz:: legend color is now changeable --- rogueviz/rogueviz.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/rogueviz/rogueviz.cpp b/rogueviz/rogueviz.cpp index 77fdd918..5bb645c5 100644 --- a/rogueviz/rogueviz.cpp +++ b/rogueviz/rogueviz.cpp @@ -1525,7 +1525,10 @@ vector legend; vector named; +color_t chosen_legend_color = DEFAULT_COLOR; + bool rogueviz_hud() { + color_t legend_color = chosen_legend_color == DEFAULT_COLOR ? forecolor : chosen_legend_color; if(!rogueviz::on) return false; if(cmode & sm::DRAW) return false; @@ -1552,7 +1555,7 @@ bool rogueviz_hud() { poly_outline = OUTLINE_NONE; queuedisk(V, vd.cp, true, NULL, i); poly_outline = OUTLINE_DEFAULT; - queuestr(int(x-rad), int(y), 0, rad*(svg::in?5:3)/4, vd.name, forecolor, 0, 16); + queuestr(int(x-rad), int(y), 0, rad*(svg::in?5:3)/4, vd.name, legend_color, 0, 16); } for(int i=0; iname, forecolor, 0, 16); + queuestr(int(x-rad), int(y), 0, rad*(svg::in?5:3)/4, t->name, legend_color, 0, 16); } quickqueue(); @@ -1927,6 +1930,10 @@ int readArgs() { shift(); fat_edges = argf(); } + else if(argis("-lcol")) { + shift(); + chosen_legend_color = arghex(); + } else if(argis("-ggamma")) { shift(); ggamma = argf(); }