embark-assistant: use STANDARDSCROLL keys instead of CURSOR keys for scrolling

develop
lethosor 2018-07-10 10:59:52 -04:00
parent 2dac3c53c7
commit 8dec8c332f
2 changed files with 12 additions and 12 deletions

@ -1303,11 +1303,11 @@ namespace embark_assist {
Screen::dismiss(this); Screen::dismiss(this);
return; return;
} else if (input->count(df::interface_key::CURSOR_LEFT) || } else if (input->count(df::interface_key::STANDARDSCROLL_LEFT) ||
input->count(df::interface_key::CURSOR_RIGHT)) { input->count(df::interface_key::STANDARDSCROLL_RIGHT)) {
state->finder_list_active = !state->finder_list_active; state->finder_list_active = !state->finder_list_active;
} else if (input->count(df::interface_key::CURSOR_UP)) { } else if (input->count(df::interface_key::STANDARDSCROLL_UP)) {
if (state->finder_list_active) { if (state->finder_list_active) {
if (state->finder_list_focus > 0) { if (state->finder_list_focus > 0) {
state->finder_list_focus--; state->finder_list_focus--;
@ -1324,7 +1324,7 @@ namespace embark_assist {
} }
} }
} else if (input->count(df::interface_key::CURSOR_DOWN)) { } else if (input->count(df::interface_key::STANDARDSCROLL_DOWN)) {
if (state->finder_list_active) { if (state->finder_list_active) {
if (state->finder_list_focus < static_cast<uint16_t>(last_fields)) { if (state->finder_list_focus < static_cast<uint16_t>(last_fields)) {
state->finder_list_focus++; state->finder_list_focus++;
@ -1372,13 +1372,13 @@ namespace embark_assist {
Screen::clear(); Screen::clear();
Screen::drawBorder("Embark Assistant Site Finder"); Screen::drawBorder("Embark Assistant Site Finder");
embark_assist::screen::paintString(lr_pen, 1, 1, DFHack::Screen::getKeyDisplay(df::interface_key::CURSOR_LEFT).c_str()); embark_assist::screen::paintString(lr_pen, 1, 1, DFHack::Screen::getKeyDisplay(df::interface_key::STANDARDSCROLL_LEFT).c_str());
embark_assist::screen::paintString(white_pen, 2, 1, "/"); embark_assist::screen::paintString(white_pen, 2, 1, "/");
embark_assist::screen::paintString(lr_pen, 3, 1, DFHack::Screen::getKeyDisplay(df::interface_key::CURSOR_RIGHT).c_str()); embark_assist::screen::paintString(lr_pen, 3, 1, DFHack::Screen::getKeyDisplay(df::interface_key::STANDARDSCROLL_RIGHT).c_str());
embark_assist::screen::paintString(white_pen, 4, 1, ":\x1b/\x1a"); embark_assist::screen::paintString(white_pen, 4, 1, ":\x1b/\x1a");
embark_assist::screen::paintString(lr_pen, 9, 1, DFHack::Screen::getKeyDisplay(df::interface_key::CURSOR_UP).c_str()); embark_assist::screen::paintString(lr_pen, 9, 1, DFHack::Screen::getKeyDisplay(df::interface_key::STANDARDSCROLL_UP).c_str());
embark_assist::screen::paintString(white_pen, 10, 1, "/"); embark_assist::screen::paintString(white_pen, 10, 1, "/");
embark_assist::screen::paintString(lr_pen, 11, 1, DFHack::Screen::getKeyDisplay(df::interface_key::CURSOR_DOWN).c_str()); embark_assist::screen::paintString(lr_pen, 11, 1, DFHack::Screen::getKeyDisplay(df::interface_key::STANDARDSCROLL_DOWN).c_str());
embark_assist::screen::paintString(white_pen, 12, 1, ":Up/Down"); embark_assist::screen::paintString(white_pen, 12, 1, ":Up/Down");
embark_assist::screen::paintString(lr_pen, 21, 1, DFHack::Screen::getKeyDisplay(df::interface_key::SELECT).c_str()); embark_assist::screen::paintString(lr_pen, 21, 1, DFHack::Screen::getKeyDisplay(df::interface_key::SELECT).c_str());
embark_assist::screen::paintString(white_pen, 26, 1, ":Select"); embark_assist::screen::paintString(white_pen, 26, 1, ":Select");

@ -298,10 +298,10 @@ namespace embark_assist{
break; break;
case pages::Finder: case pages::Finder:
embark_assist::screen::paintString(pen_lr, 1, 4, DFHack::Screen::getKeyDisplay(df::interface_key::CURSOR_LEFT).c_str()); embark_assist::screen::paintString(pen_lr, 1, 4, DFHack::Screen::getKeyDisplay(df::interface_key::STANDARDSCROLL_LEFT).c_str());
embark_assist::screen::paintString(pen_lr, 3, 4, DFHack::Screen::getKeyDisplay(df::interface_key::CURSOR_RIGHT).c_str()); embark_assist::screen::paintString(pen_lr, 3, 4, DFHack::Screen::getKeyDisplay(df::interface_key::STANDARDSCROLL_RIGHT).c_str());
embark_assist::screen::paintString(pen_lr, 1, 5, DFHack::Screen::getKeyDisplay(df::interface_key::CURSOR_UP).c_str()); embark_assist::screen::paintString(pen_lr, 1, 5, DFHack::Screen::getKeyDisplay(df::interface_key::STANDARDSCROLL_UP).c_str());
embark_assist::screen::paintString(pen_lr, 3, 5, DFHack::Screen::getKeyDisplay(df::interface_key::CURSOR_DOWN).c_str()); embark_assist::screen::paintString(pen_lr, 3, 5, DFHack::Screen::getKeyDisplay(df::interface_key::STANDARDSCROLL_DOWN).c_str());
embark_assist::screen::paintString(pen_lr, 1, 6, DFHack::Screen::getKeyDisplay(df::interface_key::SELECT).c_str()); embark_assist::screen::paintString(pen_lr, 1, 6, DFHack::Screen::getKeyDisplay(df::interface_key::SELECT).c_str());
embark_assist::screen::paintString(pen_lr, 1, 7, DFHack::Screen::getKeyDisplay(df::interface_key::CUSTOM_F).c_str()); embark_assist::screen::paintString(pen_lr, 1, 7, DFHack::Screen::getKeyDisplay(df::interface_key::CUSTOM_F).c_str());
embark_assist::screen::paintString(pen_lr, 1, 8, DFHack::Screen::getKeyDisplay(df::interface_key::LEAVESCREEN).c_str()); embark_assist::screen::paintString(pen_lr, 1, 8, DFHack::Screen::getKeyDisplay(df::interface_key::LEAVESCREEN).c_str());