(svn r1425) Added hotkeys for dock and airport toolbar

This commit is contained in:
celestar 2005-01-08 09:40:22 +00:00
parent 634c395a6f
commit 90871eeb9e
2 changed files with 24 additions and 0 deletions

View File

@ -70,6 +70,16 @@ static void BuildAirToolbWndProc(Window *w, WindowEvent *e)
_build_air_button_proc[e->click.widget - 3](w);
break;
case WE_KEYPRESS: {
switch (e->keypress.keycode) {
case '1': BuildAirClick_Airport(w); break;
case '2': BuildAirClick_Demolish(w); break;
case 'l': BuildAirClick_Landscaping(w); break;
default:
return;
}
} break;
case WE_PLACE_OBJ:
_place_proc(e->place.tile);
break;

View File

@ -119,6 +119,20 @@ static void BuildDocksToolbWndProc(Window *w, WindowEvent *e)
if (e->click.widget - 3 >= 0 && e->click.widget != 5) _build_docks_button_proc[e->click.widget - 3](w);
} break;
case WE_KEYPRESS: {
switch(e->keypress.keycode) {
case '1': BuildDocksClick_Canal(w); break;
case '2': BuildDocksClick_Lock(w); break;
case '3': BuildDocksClick_Demolish(w); break;
case '4': BuildDocksClick_Depot(w); break;
case '5': BuildDocksClick_Dock(w); break;
case '6': BuildDocksClick_Buoy(w); break;
case 'l': BuildDocksClick_Landscaping(w); break;
default:
return;
}
} break;
case WE_PLACE_OBJ:
_place_proc(e->place.tile);
break;