2015-02-17 08:43:55 -07:00
|
|
|
#include "df/viewscreen_dwarfmodest.h"
|
|
|
|
|
|
|
|
using namespace df::enums;
|
2023-01-05 18:11:01 -07:00
|
|
|
using df::global::plotinfo;
|
2015-02-17 08:43:55 -07:00
|
|
|
|
|
|
|
struct shift_8_scroll_hook : df::viewscreen_dwarfmodest {
|
|
|
|
typedef df::viewscreen_dwarfmodest interpose_base;
|
|
|
|
DEFINE_VMETHOD_INTERPOSE(void, feed, (std::set<df::interface_key>* input))
|
|
|
|
{
|
2023-01-05 18:11:01 -07:00
|
|
|
if (plotinfo->main.mode != ui_sidebar_mode::Default &&
|
2015-02-17 08:43:55 -07:00
|
|
|
input->count(interface_key::CURSOR_UP_FAST) &&
|
|
|
|
input->count(interface_key::SECONDSCROLL_PAGEDOWN)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
input->erase(interface_key::CURSOR_UP_FAST);
|
|
|
|
}
|
|
|
|
INTERPOSE_NEXT(feed)(input);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
IMPLEMENT_VMETHOD_INTERPOSE(shift_8_scroll_hook, feed);
|