summaryrefslogtreecommitdiff
path: root/plugins/manipulator.cpp
diff options
context:
space:
mode:
authorQuietust2012-08-27 09:04:32 -0500
committerQuietust2012-08-27 09:04:32 -0500
commitfaf3bdf2b7e7b4d01de2c746397cf6be12cde702 (patch)
tree0a3e5be154ec12b2be9a82c06aa6e8c833aada1c /plugins/manipulator.cpp
parentf56287186754ac90056ea79581a30a5c45828961 (diff)
downloaddfhack-faf3bdf2b7e7b4d01de2c746397cf6be12cde702.tar.gz
dfhack-faf3bdf2b7e7b4d01de2c746397cf6be12cde702.tar.bz2
dfhack-faf3bdf2b7e7b4d01de2c746397cf6be12cde702.tar.xz
Adjust grid display - labors without skills use different tiles, and skills without labors have a red background
Diffstat (limited to 'plugins/manipulator.cpp')
-rw-r--r--plugins/manipulator.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/plugins/manipulator.cpp b/plugins/manipulator.cpp
index 55fee5db..71b1fc90 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<df::unit_skill,df::enum_field<df::job_skill,int16_t>>(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);
}
}