| 1166 | } |
| 1167 | |
| 1168 | void CStaticMapArcade::ClipboardCopy() |
| 1169 | { |
| 1170 | GetGClipboard().Clear(); |
| 1171 | float mouseX = 0.5 + InputSubsystem::Instance().GetCursorX() * 0.5; |
| 1172 | float mouseY = 0.5 + InputSubsystem::Instance().GetCursorY() * 0.5; |
| 1173 | GClipboardPos = ScreenToWorld(DrawCoord(mouseX, mouseY)); |
| 1174 | for (int i = 0; i < _template->emptyVehicles.Size(); i++) |
| 1175 | { |
| 1176 | ArcadeUnitInfo& uInfo = _template->emptyVehicles[i]; |
| 1177 | if (uInfo.selected) |
| 1178 | { |
| 1179 | GetGClipboard().emptyVehicles.Add(uInfo); |
| 1180 | } |
| 1181 | } |
| 1182 | for (int i = 0; i < _template->sensors.Size(); i++) |
| 1183 | { |
| 1184 | ArcadeSensorInfo& sInfo = _template->sensors[i]; |
| 1185 | if (sInfo.selected) |
| 1186 | { |
| 1187 | GetGClipboard().sensors.Add(sInfo); |
| 1188 | } |
| 1189 | } |
| 1190 | for (int i = 0; i < _template->markers.Size(); i++) |
| 1191 | { |
| 1192 | ArcadeMarkerInfo& mInfo = _template->markers[i]; |
| 1193 | if (mInfo.selected) |
| 1194 | { |
| 1195 | GetGClipboard().markers.Add(mInfo); |
| 1196 | } |
| 1197 | } |
| 1198 | for (int i = 0; i < _template->groups.Size(); i++) |
| 1199 | { |
| 1200 | ArcadeGroupInfo& gInfo = _template->groups[i]; |
| 1201 | bool grpSelected = false; |
| 1202 | for (int j = 0; j < gInfo.units.Size(); j++) |
| 1203 | { |
| 1204 | ArcadeUnitInfo& uInfo = gInfo.units[j]; |
| 1205 | if (uInfo.selected) |
| 1206 | { |
| 1207 | grpSelected = true; |
| 1208 | break; |
| 1209 | } |
| 1210 | } |
| 1211 | if (!grpSelected) |
| 1212 | { |
| 1213 | continue; |
| 1214 | } |
| 1215 | int index = GetGClipboard().groups.Add(); |
| 1216 | ArcadeGroupInfo& gDest = GetGClipboard().groups[index]; |
| 1217 | for (int j = 0; j < gInfo.units.Size(); j++) |
| 1218 | { |
| 1219 | ArcadeUnitInfo& uInfo = gInfo.units[j]; |
| 1220 | if (uInfo.selected) |
| 1221 | { |
| 1222 | gDest.units.Add(uInfo); |
| 1223 | } |
| 1224 | } |
| 1225 | for (int j = 0; j < gInfo.sensors.Size(); j++) |
nothing calls this directly
no test coverage detected