imglab: select next/previous image with 's' and 'w' (#964)

* imglab: select next/previous image with 's' and 'w'

* imglab: make 'w' and 's' keys behave like UP and DOWN keys; add 'about' text
This commit is contained in:
hannometer 2017-11-22 11:42:15 +01:00 committed by Davis E. King
parent 2b8becae97
commit 2f531f1175

View File

@ -354,8 +354,19 @@ on_keydown (
select_image(image_pos);
}
return;
// Make 'w' and 's' act like KEY_UP and KEY_DOWN
if ((key == 'w' || key == 'W') && !overlay_label.has_input_focus())
{
key = base_window::KEY_UP;
}
else if ((key == 's' || key == 'S') && !overlay_label.has_input_focus())
{
key = base_window::KEY_DOWN;
}
else
{
return;
}
}
if (key == base_window::KEY_UP)
@ -636,6 +647,9 @@ display_about(
"command line. An example would be '--parts \"leye reye nose mouth\"'."
,0,0) << endl << endl;
sout << wrap_string("Press the down or s key to select the next image in the list and the up or w "
"key to select the previous one.",0,0) << endl << endl;
sout << wrap_string("Additionally, you can hold ctrl and then scroll the mouse wheel to zoom. A normal left click "
"and drag allows you to navigate around the image. Holding ctrl and "
"left clicking a rectangle will give it the label from the Next Label field. "