| 227 | } |
| 228 | |
| 229 | void SimulationParametersMainWindow::processDetailWidget() |
| 230 | { |
| 231 | auto height = getDetailWidgetHeight(); |
| 232 | if (ImGui::BeginChild("##detail", {0, height})) { |
| 233 | auto title = _filter.empty() ? "Parameters" : "Parameters (filtered)"; |
| 234 | if (_detailWidgetOpen = AlienImGui::BeginTreeNode(AlienImGui::TreeNodeParameters() |
| 235 | .name((std::string(title) + "###parameters").c_str()) |
| 236 | .rank(AlienImGui::TreeNodeRank::High) |
| 237 | .defaultOpen(_detailWidgetOpen))) { |
| 238 | ImGui::Spacing(); |
| 239 | AlienImGui::SetFilterText(_filter); |
| 240 | if (ImGui::BeginChild( |
| 241 | "##detail2", {0, -ImGui::GetStyle().FramePadding.y - scale(33.0f)}, ImGuiChildFlags_Border, ImGuiWindowFlags_HorizontalScrollbar)) { |
| 242 | auto type = _locations.at(_selectedLocationIndex).type; |
| 243 | if (type == LocationType::Base) { |
| 244 | _baseWidgets->process(); |
| 245 | } else if (type == LocationType::ParameterZone) { |
| 246 | _zoneWidgets->setLocationIndex(_selectedLocationIndex); |
| 247 | _zoneWidgets->process(); |
| 248 | } else if (type == LocationType::RadiationSource) { |
| 249 | _sourceWidgets->setLocationIndex(_selectedLocationIndex); |
| 250 | _sourceWidgets->process(); |
| 251 | } |
| 252 | } |
| 253 | ImGui::EndChild(); |
| 254 | AlienImGui::ResetFilterText(); |
| 255 | |
| 256 | ImGui::Spacing(); |
| 257 | AlienImGui::InputFilter(AlienImGui::InputFilterParameters().width(250.0f), _filter); |
| 258 | } |
| 259 | AlienImGui::EndTreeNode(); |
| 260 | } |
| 261 | ImGui::EndChild(); |
| 262 | |
| 263 | if (_detailWidgetOpen && _expertWidgetOpen) { |
| 264 | ImGui::PushID("detail"); |
| 265 | AlienImGui::MovableSeparator(AlienImGui::MovableSeparatorParameters().additive(false), _expertWidgetHeight); |
| 266 | ImGui::PopID(); |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | void SimulationParametersMainWindow::processExpertWidget() |
| 271 | { |
nothing calls this directly
no test coverage detected