| 307 | } |
| 308 | |
| 309 | void _InspectorWindow::processCellFunctionPropertiesTab(CellDescription& cell) |
| 310 | { |
| 311 | if (cell.getCellFunctionType() == CellFunction_None) { |
| 312 | return; |
| 313 | } |
| 314 | |
| 315 | std::string title = Const::CellFunctionToStringMap.at(cell.getCellFunctionType()); |
| 316 | if (ImGui::BeginTabItem(title.c_str(), nullptr, ImGuiTabItemFlags_None)) { |
| 317 | if (ImGui::BeginChild("##", ImVec2(0, 0), false, ImGuiWindowFlags_HorizontalScrollbar)) { |
| 318 | switch (cell.getCellFunctionType()) { |
| 319 | case CellFunction_Neuron: { |
| 320 | processNeuronContent(std::get<NeuronDescription>(*cell.cellFunction)); |
| 321 | } break; |
| 322 | case CellFunction_Transmitter: { |
| 323 | processTransmitterContent(std::get<TransmitterDescription>(*cell.cellFunction)); |
| 324 | } break; |
| 325 | case CellFunction_Constructor: { |
| 326 | processConstructorContent(std::get<ConstructorDescription>(*cell.cellFunction)); |
| 327 | } break; |
| 328 | case CellFunction_Sensor: { |
| 329 | processSensorContent(std::get<SensorDescription>(*cell.cellFunction)); |
| 330 | } break; |
| 331 | case CellFunction_Nerve: { |
| 332 | processNerveContent(std::get<NerveDescription>(*cell.cellFunction)); |
| 333 | } break; |
| 334 | case CellFunction_Attacker: { |
| 335 | processAttackerContent(std::get<AttackerDescription>(*cell.cellFunction)); |
| 336 | } break; |
| 337 | case CellFunction_Injector: { |
| 338 | processInjectorContent(std::get<InjectorDescription>(*cell.cellFunction)); |
| 339 | } break; |
| 340 | case CellFunction_Muscle: { |
| 341 | processMuscleContent(std::get<MuscleDescription>(*cell.cellFunction)); |
| 342 | } break; |
| 343 | case CellFunction_Defender: { |
| 344 | processDefenderContent(std::get<DefenderDescription>(*cell.cellFunction)); |
| 345 | } break; |
| 346 | case CellFunction_Reconnector: { |
| 347 | processReconnectorContent(std::get<ReconnectorDescription>(*cell.cellFunction)); |
| 348 | } break; |
| 349 | case CellFunction_Detonator: { |
| 350 | processDetonatorContent(std::get<DetonatorDescription>(*cell.cellFunction)); |
| 351 | } break; |
| 352 | } |
| 353 | } |
| 354 | ImGui::EndChild(); |
| 355 | ImGui::EndTabItem(); |
| 356 | } |
| 357 | } |
| 358 | |
| 359 | template <typename Description> |
| 360 | void _InspectorWindow::processCellGenomeTab(Description& desc) |
nothing calls this directly
no test coverage detected