| 28 | {} |
| 29 | |
| 30 | void ResizeWorldDialog::processIntern() |
| 31 | { |
| 32 | if (ImGui::BeginTable("##", 2, ImGuiTableFlags_SizingStretchProp)) { |
| 33 | |
| 34 | //width |
| 35 | ImGui::TableNextRow(); |
| 36 | |
| 37 | ImGui::TableSetColumnIndex(0); |
| 38 | ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x); |
| 39 | ImGui::InputInt("##width", &_width); |
| 40 | ImGui::PopItemWidth(); |
| 41 | |
| 42 | ImGui::TableSetColumnIndex(1); |
| 43 | ImGui::Text("Width"); |
| 44 | |
| 45 | //height |
| 46 | ImGui::TableNextRow(); |
| 47 | ImGui::TableSetColumnIndex(0); |
| 48 | ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x); |
| 49 | ImGui::InputInt("##height", &_height); |
| 50 | ImGui::PopItemWidth(); |
| 51 | |
| 52 | ImGui::TableSetColumnIndex(1); |
| 53 | ImGui::Text("Height"); |
| 54 | |
| 55 | ImGui::EndTable(); |
| 56 | } |
| 57 | AlienImGui::ToggleButton(AlienImGui::ToggleButtonParameters().name("Scale content"), _scaleContent); |
| 58 | |
| 59 | AlienImGui::Separator(); |
| 60 | |
| 61 | if (AlienImGui::Button("OK")) { |
| 62 | onResizing(); |
| 63 | close(); |
| 64 | } |
| 65 | ImGui::SetItemDefaultFocus(); |
| 66 | |
| 67 | ImGui::SameLine(); |
| 68 | if (AlienImGui::Button("Cancel")) { |
| 69 | close(); |
| 70 | } |
| 71 | |
| 72 | _width = std::max(1, _width); |
| 73 | _height = std::max(1, _height); |
| 74 | } |
| 75 | |
| 76 | void ResizeWorldDialog::onResizing() |
| 77 | { |
nothing calls this directly
no test coverage detected