Make backspace seek to top left corner in manipulator.

develop
Alexander Gavrilov 2012-09-29 13:01:11 +04:00
parent eaddd0e646
commit 7a74088287
1 changed files with 10 additions and 0 deletions

@ -385,7 +385,11 @@ viewscreen_unitlaborsst::viewscreen_unitlaborsst(vector<df::unit*> &src, int cur
{
df::unit *unit = src[i];
if (!unit)
{
if (cursor_pos > i)
cursor_pos--;
continue;
}
UnitInfo *cur = new UnitInfo;
@ -628,6 +632,9 @@ void viewscreen_unitlaborsst::feed(set<df::interface_key> *events)
sel_row = units.size() - 1;
}
if (events->count(interface_key::STRING_A000))
sel_row = 0;
if (sel_row < first_row)
first_row = sel_row;
if (first_row < sel_row - num_rows + 1)
@ -661,6 +668,9 @@ void viewscreen_unitlaborsst::feed(set<df::interface_key> *events)
sel_column = next;
}
if (events->count(interface_key::STRING_A000))
sel_column = 0;
if (sel_column < 0)
sel_column = 0;
if (sel_column > NUM_COLUMNS - 1)