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

Method processIntern

source/Gui/NewSimulationDialog.cpp:36–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34{}
35
36void NewSimulationDialog::processIntern()
37{
38 AlienImGui::InputText(AlienImGui::InputTextParameters().name("Project name").textWidth(ContentTextInputWidth), _projectName, ProjectNameSize);
39 AlienImGui::InputInt(AlienImGui::InputIntParameters().name("Width").textWidth(ContentTextInputWidth), _width);
40 AlienImGui::InputInt(AlienImGui::InputIntParameters().name("Height").textWidth(ContentTextInputWidth), _height);
41 AlienImGui::Checkbox(
42 AlienImGui::CheckboxParameters().name("Adopt simulation parameters").textWidth(0), _adoptSimulationParameters);
43
44 ImGui::Dummy({0, ImGui::GetContentRegionAvail().y - scale(50.0f)});
45 AlienImGui::Separator();
46 if (AlienImGui::Button("OK")) {
47 ImGui::CloseCurrentPopup();
48 onNewSimulation();
49 close();
50 }
51 ImGui::SetItemDefaultFocus();
52
53 ImGui::SameLine();
54 if (AlienImGui::Button("Cancel")) {
55 ImGui::CloseCurrentPopup();
56 close();
57 }
58
59 _width = std::max(1, _width);
60 _height = std::max(1, _height);
61}
62
63void NewSimulationDialog::openIntern()
64{

Callers

nothing calls this directly

Calls 4

InputTextParametersClass · 0.85
InputIntParametersClass · 0.85
CheckboxParametersClass · 0.85
scaleFunction · 0.85

Tested by

no test coverage detected