| 217 | } |
| 218 | |
| 219 | void _InspectorWindow::processCellFunctionTab(CellDescription& cell) |
| 220 | { |
| 221 | if (ImGui::BeginTabItem("Function", nullptr, ImGuiTabItemFlags_None)) { |
| 222 | int type = cell.getCellFunctionType(); |
| 223 | if (ImGui::BeginChild("##", ImVec2(0, 0), false, ImGuiWindowFlags_HorizontalScrollbar)) { |
| 224 | if (ImGui::TreeNodeEx("Properties##Function", TreeNodeFlags)) { |
| 225 | if (AlienImGui::CellFunctionCombo( |
| 226 | AlienImGui::CellFunctionComboParameters() |
| 227 | .name("Function") |
| 228 | .textWidth(CellFunctionBaseTabTextWidth) |
| 229 | .tooltip(Const::getCellFunctionTooltip(type)), |
| 230 | type)) { |
| 231 | switch (type) { |
| 232 | case CellFunction_Neuron: { |
| 233 | cell.cellFunction = NeuronDescription(); |
| 234 | } break; |
| 235 | case CellFunction_Transmitter: { |
| 236 | cell.cellFunction = TransmitterDescription(); |
| 237 | } break; |
| 238 | case CellFunction_Constructor: { |
| 239 | cell.cellFunction = ConstructorDescription(); |
| 240 | } break; |
| 241 | case CellFunction_Sensor: { |
| 242 | cell.cellFunction = SensorDescription(); |
| 243 | } break; |
| 244 | case CellFunction_Nerve: { |
| 245 | cell.cellFunction = NerveDescription(); |
| 246 | } break; |
| 247 | case CellFunction_Attacker: { |
| 248 | cell.cellFunction = AttackerDescription(); |
| 249 | } break; |
| 250 | case CellFunction_Injector: { |
| 251 | cell.cellFunction = InjectorDescription(); |
| 252 | } break; |
| 253 | case CellFunction_Muscle: { |
| 254 | cell.cellFunction = MuscleDescription(); |
| 255 | } break; |
| 256 | case CellFunction_Defender: { |
| 257 | cell.cellFunction = DefenderDescription(); |
| 258 | } break; |
| 259 | case CellFunction_Reconnector: { |
| 260 | cell.cellFunction = ReconnectorDescription(); |
| 261 | } break; |
| 262 | case CellFunction_Detonator: { |
| 263 | cell.cellFunction = DetonatorDescription(); |
| 264 | } break; |
| 265 | case CellFunction_None: { |
| 266 | cell.cellFunction.reset(); |
| 267 | } break; |
| 268 | } |
| 269 | } |
| 270 | |
| 271 | AlienImGui::InputInt( |
| 272 | AlienImGui::InputIntParameters() |
| 273 | .name("Activation time") |
| 274 | .textWidth(CellFunctionBaseTabTextWidth) |
| 275 | .tooltip(Const::GenomeConstructorOffspringActivationTime), |
| 276 | cell.activationTime); |
nothing calls this directly
no test coverage detected