(svn r10265) -Feature: allow double-clicking on certain places: build-vehicle and town-action

This commit is contained in:
truelight
2007-06-22 10:57:53 +00:00
parent 73f593f93d
commit dc82eeb2ae
4 changed files with 53 additions and 13 deletions

View File

@@ -996,6 +996,14 @@ static void NewVehicleWndProc(Window *w, WindowEvent *e)
BuildVehicleClickEvent(w, e);
break;
case WE_DOUBLE_CLICK:
if (e->we.click.widget == BUILD_VEHICLE_WIDGET_LIST) {
/* When double clicking, we want to buy a vehicle */
e->we.click.widget = BUILD_VEHICLE_WIDGET_BUILD;
BuildVehicleClickEvent(w, e);
}
break;
case WE_ON_EDIT_TEXT: {
if (e->we.edittext.str[0] != '\0') {
StringID str = STR_NULL;