Adding Shift-Up to the fast-trade tweak.

develop
Eric Wald 2014-11-06 22:22:02 -07:00
parent 7fb82131c7
commit 46ebeaa722
1 changed files with 14 additions and 2 deletions

@ -12,6 +12,13 @@ struct fast_trade_assign_hook : df::viewscreen_layer_assigntradest {
tmp.clear(); tmp.insert(interface_key::STANDARDSCROLL_DOWN);
INTERPOSE_NEXT(feed)(&tmp);
}
else if (layer_objects[1]->active && input->count(interface_key::CURSOR_UP_FAST))
{
set<df::interface_key> tmp; tmp.insert(interface_key::SELECT);
INTERPOSE_NEXT(feed)(&tmp);
tmp.clear(); tmp.insert(interface_key::STANDARDSCROLL_UP);
INTERPOSE_NEXT(feed)(&tmp);
}
else
INTERPOSE_NEXT(feed)(input);
}
@ -25,13 +32,18 @@ struct fast_trade_select_hook : df::viewscreen_tradegoodsst {
DEFINE_VMETHOD_INTERPOSE(void, feed, (set<df::interface_key> *input))
{
if (!(is_unloading || !has_traders || in_edit_count)
&& input->count(interface_key::CURSOR_DOWN_FAST))
&& (input->count(interface_key::CURSOR_DOWN_FAST) || input->count(interface_key::CURSOR_UP_FAST)))
{
set<df::interface_key> tmp; tmp.insert(interface_key::SELECT);
INTERPOSE_NEXT(feed)(&tmp);
if (in_edit_count)
INTERPOSE_NEXT(feed)(&tmp);
tmp.clear(); tmp.insert(interface_key::STANDARDSCROLL_DOWN);
tmp.clear();
if (input->count(interface_key::CURSOR_DOWN_FAST)) {
tmp.insert(interface_key::STANDARDSCROLL_DOWN);
} else if (input->count(interface_key::CURSOR_UP_FAST)) {
tmp.insert(interface_key::STANDARDSCROLL_UP);
}
INTERPOSE_NEXT(feed)(&tmp);
}
else