From faf3bdf2b7e7b4d01de2c746397cf6be12cde702 Mon Sep 17 00:00:00 2001 From: Quietust Date: Mon, 27 Aug 2012 09:04:32 -0500 Subject: [PATCH] Adjust grid display - labors without skills use different tiles, and skills without labors have a red background --- plugins/manipulator.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/plugins/manipulator.cpp b/plugins/manipulator.cpp index 55fee5db0..71b1fc907 100644 --- a/plugins/manipulator.cpp +++ b/plugins/manipulator.cpp @@ -630,11 +630,9 @@ void viewscreen_unitlaborsst::render() int col_offset = col + first_column; fg = 15; bg = 0; + char c = 0xFA; if ((col_offset == sel_column) && (row_offset == sel_row)) fg = 9; - if ((columns[col_offset].labor != unit_labor::NONE) && (unit->status.labors[columns[col_offset].labor])) - bg = 7; - char c = '-'; if (columns[col_offset].skill != job_skill::NONE) { df::unit_skill *skill = binsearch_in_vector>(unit->status.current_soul->skills, &df::unit_skill::id, columns[col_offset].skill); @@ -645,7 +643,20 @@ void viewscreen_unitlaborsst::render() level = NUM_SKILL_LEVELS - 1; c = skill_levels[level].abbrev; } + else + c = '-'; } + if (columns[col_offset].labor != unit_labor::NONE) + { + if (unit->status.labors[columns[col_offset].labor]) + { + bg = 7; + if (columns[col_offset].skill == job_skill::NONE) + c = 0xF9; + } + } + else + bg = 4; Screen::paintTile(Screen::Pen(c, fg, bg), 1 + name_width + 1 + prof_width + 1 + col, 3 + row); } }