Avoid overwriting dynamic lines.

Even vanilla DF has three additional workshop order lines that only show up with modded raws.
develop
Eric Wald 2016-01-09 14:47:00 -07:00
parent 53780d8232
commit 7c9002c4ea
1 changed files with 9 additions and 1 deletions

@ -246,7 +246,15 @@ struct autogem_hook : public df::viewscreen_dwarfmodest {
auto dims = Gui::getDwarfmodeViewDims();
int x = dims.menu_x1 + 1;
int y = dims.y1 + 12;
OutputHotkeyString(x, y, (running? "Auto Cut Gems": "No Auto Cut Gems"), "g", false, x, COLOR_WHITE, COLOR_LIGHTRED);
Screen::Pen pen = Screen::readTile(x, y);
while (pen.valid() && pen.ch != ' ') {
pen = Screen::readTile(x, ++y);
}
if (pen.valid()) {
OutputHotkeyString(x, y, (running? "Auto Cut Gems": "No Auto Cut Gems"), "g", false, x, COLOR_WHITE, COLOR_LIGHTRED);
}
}
}
};