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

Method process

source/Gui/SimulationParametersBaseWidgets.cpp:44–1588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void _SimulationParametersBaseWidgets::process()
45{
46 auto parameters = _simulationFacade->getSimulationParameters();
47 auto origParameters = _simulationFacade->getOriginalSimulationParameters();
48 auto lastParameters = parameters;
49
50 /**
51 * General
52 */
53 if (AlienImGui::BeginTreeNode(AlienImGui::TreeNodeParameters().name("General"))) {
54 AlienImGui::InputText(
55 AlienImGui::InputTextParameters().name("Project name").textWidth(RightColumnWidth).defaultValue(origParameters.projectName),
56 parameters.projectName,
57 sizeof(Char64) / sizeof(char));
58 }
59 AlienImGui::EndTreeNode();
60 /**
61 * Rendering
62 */
63 if (AlienImGui::BeginTreeNode(AlienImGui::TreeNodeParameters().name("Visualization"))) {
64 AlienImGui::ColorButtonWithPicker(
65 AlienImGui::ColorButtonWithPickerParameters().name("Background color").textWidth(RightColumnWidth).defaultValue(origParameters.backgroundColor),
66 parameters.backgroundColor,
67 _backupColor,
68 _zoneColorPalette.getReference());
69 AlienImGui::Switcher(
70 AlienImGui::SwitcherParameters()
71 .name("Primary cell coloring")
72 .textWidth(RightColumnWidth)
73 .defaultValue(origParameters.cellColoring)
74 .values(
75 {"Energy",
76 "Standard cell colors",
77 "Mutants",
78 "Mutants and cell functions",
79 "Cell states",
80 "Genome complexities",
81 "Single cell function",
82 "All cell functions"})
83 .tooltip(Const::ColoringParameterTooltip),
84 parameters.cellColoring);
85 if (parameters.cellColoring == CellColoring_CellFunction) {
86 AlienImGui::Switcher(
87 AlienImGui::SwitcherParameters()
88 .name("Highlighted cell function")
89 .textWidth(RightColumnWidth)
90 .defaultValue(origParameters.highlightedCellFunction)
91 .values(_cellFunctionStrings)
92 .tooltip("The specific cell function type to be highlighted can be selected here."),
93 parameters.highlightedCellFunction);
94 }
95 AlienImGui::SliderFloat(
96 AlienImGui::SliderFloatParameters()
97 .name("Cell radius")
98 .textWidth(RightColumnWidth)
99 .min(0)
100 .max(0.5f)
101 .defaultValue(&origParameters.cellRadius)

Callers

nothing calls this directly

Tested by

no test coverage detected