[manipulator] Tweak colors to make cursor easier to locate (#2051)

develop
Tim Siegel 2022-03-31 02:39:20 -04:00 committed by GitHub
parent ec0941da2f
commit b5af004194
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 6 deletions

@ -52,6 +52,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
- `gui/create-item`: Added "(chain)" annotation text for armours with the [CHAIN_METAL_TEXT] flag set
- DFHack log messages now have configurable headers (e.g. timestamp, origin plugin name, etc.) via the ``debugfilter`` command of the `debug` plugin
- Script execution log messages (e.g. "Loading script: dfhack_extras.init" can now be controlled with the ``debugfilter`` command. To hide the messages, add this line to your ``dfhack.init`` file: ``debugfilter set Warning core script``
- `manipulator`: Tweak colors to make the cursor easier to locate
## Documentation
- Add more examples to the plugin skeleton files so they are more informative for a newbie

@ -2052,11 +2052,10 @@ void viewscreen_unitlaborsst::render()
for (int col = 0; col < col_widths[DISP_COLUMN_LABORS]; col++)
{
int col_offset = col + first_column;
fg = 15;
bg = 0;
bool is_labor_set = false;
fg = COLOR_GREY;
bg = COLOR_BLACK;
uint8_t c = 0xFA;
if ((col_offset == sel_column) && (row_offset == sel_row))
fg = 9;
if (columns[col_offset].skill != job_skill::NONE)
{
df::unit_skill *skill = NULL;
@ -2076,13 +2075,23 @@ void viewscreen_unitlaborsst::render()
{
if (unit->status.labors[columns[col_offset].labor])
{
bg = 7;
is_labor_set = true;
fg = COLOR_WHITE;
bg = COLOR_GREY;
if (columns[col_offset].skill == job_skill::NONE)
c = 0xF9;
}
}
else
bg = 3;
{
fg = COLOR_WHITE;
bg = COLOR_CYAN;
}
if ((col_offset == sel_column) && (row_offset == sel_row))
{
fg = is_labor_set ? COLOR_WHITE : COLOR_GREY;
bg = is_labor_set ? COLOR_LIGHTBLUE : COLOR_BLUE;
}
Screen::paintTile(Screen::Pen(c, fg, bg), col_offsets[DISP_COLUMN_LABORS] + col, 4 + row);
}
}