| 20 | {} |
| 21 | |
| 22 | void ChangeColorDialog::processIntern() |
| 23 | { |
| 24 | AlienImGui::Group("Color transition rule"); |
| 25 | if (ImGui::BeginTable("##", 3, ImGuiTableFlags_SizingStretchProp)) { |
| 26 | ImGui::TableSetupColumn("", ImGuiTableColumnFlags_WidthStretch, 0); |
| 27 | ImGui::TableSetupColumn("", ImGuiTableColumnFlags_WidthFixed, scale(20)); |
| 28 | ImGui::TableSetupColumn("", ImGuiTableColumnFlags_WidthStretch, 0); |
| 29 | ImGui::TableNextRow(); |
| 30 | |
| 31 | ImGui::TableSetColumnIndex(0); |
| 32 | ImGui::PushID("##1"); |
| 33 | AlienImGui::ComboColor(AlienImGui::ComboColorParameters().textWidth(0).width(0), _sourceColor); |
| 34 | ImGui::PopID(); |
| 35 | |
| 36 | ImGui::TableSetColumnIndex(1); |
| 37 | AlienImGui::Text(ICON_FA_LONG_ARROW_ALT_RIGHT); |
| 38 | |
| 39 | ImGui::TableSetColumnIndex(2); |
| 40 | ImGui::PushID("target color"); |
| 41 | AlienImGui::ComboColor(AlienImGui::ComboColorParameters().textWidth(0).width(0), _targetColor); |
| 42 | ImGui::PopID(); |
| 43 | |
| 44 | ImGui::EndTable(); |
| 45 | } |
| 46 | AlienImGui::Group("Options"); |
| 47 | ImGui::Checkbox("##includeSubgenomes", &_includeSubGenomes); |
| 48 | ImGui::SameLine(0, ImGui::GetStyle().FramePadding.x * 4); |
| 49 | AlienImGui::Text("Include sub-genomes"); |
| 50 | |
| 51 | ImGui::Dummy({0, ImGui::GetContentRegionAvail().y - scale(50.0f)}); |
| 52 | AlienImGui::Separator(); |
| 53 | |
| 54 | if (AlienImGui::Button("OK")) { |
| 55 | auto genome = _getGenomeFunc(); |
| 56 | onChangeColor(genome); |
| 57 | _setGenomeFunc(genome); |
| 58 | close(); |
| 59 | } |
| 60 | ImGui::SetItemDefaultFocus(); |
| 61 | ImGui::SameLine(); |
| 62 | if (AlienImGui::Button("Cancel")) { |
| 63 | close(); |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | void ChangeColorDialog::onChangeColor(GenomeDescription& genome) |
| 68 | { |
nothing calls this directly
no test coverage detected