Add auto named group generated when dropping a vehicle onto new group button

This commit is contained in:
Andreas Schmitt
2021-06-20 08:35:28 +02:00
parent 9f56818ca7
commit 8b66ebd4f0
5 changed files with 217 additions and 0 deletions

View File

@@ -999,6 +999,16 @@ public:
}
break;
}
case WID_GL_CREATE_GROUP: { // make new group with vehicle specific name and add vehicle
const VehicleID vindex = this->vehicle_sel;
this->vehicle_sel = INVALID_VEHICLE;
this->group_over = INVALID_GROUP;
this->SetDirty();
DoCommandP(0, vindex | (_ctrl_pressed ? 1 << 31 : 0),0 , CMD_CREATE_GROUP_AUTO_NAME, nullptr, nullptr);
break;
}
}
}