| 32 | {} |
| 33 | |
| 34 | void MultiplierWindow::processIntern() |
| 35 | { |
| 36 | AlienImGui::SelectableToolbarButton(ICON_GRID, _mode, MultiplierMode_Grid, MultiplierMode_Grid); |
| 37 | |
| 38 | ImGui::SameLine(); |
| 39 | AlienImGui::SelectableToolbarButton(ICON_RANDOM, _mode, MultiplierMode_Random, MultiplierMode_Random); |
| 40 | |
| 41 | if (ImGui::BeginChild("##", ImVec2(0, ImGui::GetContentRegionAvail().y - scale(50.0f)), false, ImGuiWindowFlags_HorizontalScrollbar)) { |
| 42 | |
| 43 | ImGui::BeginDisabled(EditorModel::get().isSelectionEmpty()); |
| 44 | |
| 45 | AlienImGui::Group(ModeText.at(_mode)); |
| 46 | if (_mode == MultiplierMode_Grid) { |
| 47 | processGridPanel(); |
| 48 | } |
| 49 | if (_mode == MultiplierMode_Random) { |
| 50 | processRandomPanel(); |
| 51 | } |
| 52 | ImGui::EndDisabled(); |
| 53 | } |
| 54 | ImGui::EndChild(); |
| 55 | |
| 56 | AlienImGui::Separator(); |
| 57 | ImGui::BeginDisabled( |
| 58 | EditorModel::get().isSelectionEmpty() |
| 59 | || (_selectionDataAfterMultiplication && _selectionDataAfterMultiplication->compareNumbers(EditorModel::get().getSelectionShallowData()))); |
| 60 | if (AlienImGui::Button("Build")) { |
| 61 | onBuild(); |
| 62 | } |
| 63 | ImGui::EndDisabled(); |
| 64 | |
| 65 | ImGui::SameLine(); |
| 66 | ImGui::BeginDisabled( |
| 67 | EditorModel::get().isSelectionEmpty() || !_selectionDataAfterMultiplication |
| 68 | || !_selectionDataAfterMultiplication->compareNumbers(EditorModel::get().getSelectionShallowData())); |
| 69 | if (AlienImGui::Button("Undo")) { |
| 70 | onUndo(); |
| 71 | } |
| 72 | ImGui::EndDisabled(); |
| 73 | |
| 74 | validateAndCorrect(); |
| 75 | } |
| 76 | |
| 77 | bool MultiplierWindow::isShown() |
| 78 | { |
nothing calls this directly
no test coverage detected