MCPcopy Create free account
hub / github.com/chrxh/alien / processSensorContent

Method processSensorContent

source/Gui/InspectorWindow.cpp:643–670  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

641}
642
643void _InspectorWindow::processSensorContent(SensorDescription& sensor)
644{
645 if (ImGui::TreeNodeEx("Properties", TreeNodeFlags)) {
646 AlienImGui::ComboOptionalColor(
647 AlienImGui::ComboColorParameters().name("Scan color").textWidth(CellFunctionTextWidth).tooltip(Const::GenomeSensorScanColorTooltip), sensor.restrictToColor);
648
649 AlienImGui::Combo(
650 AlienImGui::ComboParameters()
651 .name("Scan mutants")
652 .values({"None", "Same mutants", "Other mutants", "Free cells", "Handcrafted cells", "Less complex mutants", "More complex mutants"})
653 .textWidth(CellFunctionTextWidth)
654 .tooltip(Const::SensorRestrictToMutantsTooltip),
655 sensor.restrictToMutants);
656 AlienImGui::InputFloat(
657 AlienImGui::InputFloatParameters()
658 .name("Min density")
659 .format("%.2f")
660 .step(0.05f)
661 .textWidth(CellFunctionTextWidth)
662 .tooltip(Const::GenomeSensorMinDensityTooltip),
663 sensor.minDensity);
664 AlienImGui::InputOptionalInt(
665 AlienImGui::InputIntParameters().name("Min range").textWidth(CellFunctionTextWidth).tooltip(Const::GenomeSensorMinRangeTooltip), sensor.minRange);
666 AlienImGui::InputOptionalInt(
667 AlienImGui::InputIntParameters().name("Max range").textWidth(CellFunctionTextWidth).tooltip(Const::GenomeSensorMaxRangeTooltip), sensor.maxRange);
668 ImGui::TreePop();
669 }
670}
671
672void _InspectorWindow::processReconnectorContent(ReconnectorDescription& reconnector)
673{

Callers

nothing calls this directly

Calls 5

ComboParametersClass · 0.85
InputIntParametersClass · 0.85
formatMethod · 0.80

Tested by

no test coverage detected