Skip to content

Commit

Permalink
further missing tooltips added
Browse files Browse the repository at this point in the history
  • Loading branch information
chrxh committed Jun 19, 2024
1 parent 47296ca commit e29bba6
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 32 deletions.
2 changes: 1 addition & 1 deletion source/Gui/GenomeEditorWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ void _GenomeEditorWindow::processGenomeHeader(TabData& tab)
.name("Repetitions per branch")
.infinity(true)
.textWidth(ContentHeaderTextWidth)
.tooltip(Const::GenomeRepetitionsPerConstructionTooltip),
.tooltip(Const::GenomeRepetitionsPerBranchTooltip),
tab.genome.header.numRepetitions);
if (tab.genome.header.numRepetitions > 1) {
table.next();
Expand Down
28 changes: 23 additions & 5 deletions source/Gui/HelpStrings.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,10 @@ namespace Const
"be multiples of certain values. This allows for greater stability of the created networks, as the angles would otherwise be more susceptible to "
"external influences. Choosing 60 degrees is recommended here, as it allows for the accurate representation of most geometries.";

std::string const GenomeNumBranchesTooltip = "Specifies how many constructions (including repetitions) should be created and connected to the constructor.";
std::string const GenomeNumBranchesTooltip = "Specifies how many branches the constructor can use to build the cell networks. Each branch is connected to "
"the constructor cell and consists of repetitions of the encoded cell network.";

std::string const GenomeRepetitionsPerConstructionTooltip =
std::string const GenomeRepetitionsPerBranchTooltip =
"This value specifies how many times the cell network described in the genome should be concatenated for each construction. For a value greater "
"than 1, the cell network geometry has to fulfill certain requirements (e.g. rectangle, hexagon, loop and lolli geometries are not suitable for "
"concatenation). A value of infinity is also possible, but should not be used for an activated completeness check (see simulation parameters).";
Expand Down Expand Up @@ -329,6 +330,19 @@ namespace Const
"is completed by the constructor, the cells briefly enter the 'Activating' state before transitioning to the 'Ready' state shortly after. If a cell "
"network is in the process of dying, its cells are in the 'Dying' state.";

std::string const ColoringParameterTooltip =
"Here, one can set how the cells are to be colored during rendering. \n\n" ICON_FA_CHEVRON_RIGHT
" Energy: The more energy a cell has, the brighter it is displayed. A grayscale is used.\n\n" ICON_FA_CHEVRON_RIGHT
" Standard cell colors: Each cell is assigned one of 7 default colors, which is displayed with this option. \n\n" ICON_FA_CHEVRON_RIGHT
" Mutants: Different mutants are represented by different colors (only larger structural mutations such as translations or duplications are taken into "
"account).\n\n" ICON_FA_CHEVRON_RIGHT " Mutants and cell functions: Combination of mutants and cell function coloring.\n\n" ICON_FA_CHEVRON_RIGHT
" Cell states: green = under construction, blue = ready, red = dying\n\n" ICON_FA_CHEVRON_RIGHT
" Genome complexities: This property can be utilized by attacker cells when the parameter 'Complex genome protection' is "
"activated (see tooltip there). The coloring is as follows: blue = creature with low bonus (usually small or simple genome structure), red = large "
"bonus\n\n" ICON_FA_CHEVRON_RIGHT
" Single cell function: A specific type of cell function can be highlighted, which is selected in the next parameter.\n\n" ICON_FA_CHEVRON_RIGHT
" All cell functions: The cells are colored according to their cell function.";

inline std::string getCellFunctionTooltip(CellFunction cellFunction)
{
switch (cellFunction) {
Expand Down Expand Up @@ -368,10 +382,14 @@ namespace Const

std::string const GenomeNumCellsTooltip = "The number of the encoded cells per repetition in the genome. Cells of sub-genomes are not counted here.";

std::string const GenomeCurrentCellTooltip = "The sequence number of the cell in the genome that will be constructed next.";
std::string const GenomeCurrentBranchTooltip = "This number specifies the current branch on which the construction process takes place. Each branch is "
"connected to the constructor cell and consists of repetitions of the encoded cell network.";

std::string const GenomeCurrentRepetitionTooltip = "The cell network encoded in the genome can be repeated in a single construction by specifying a number of "
"repetitions. This value indicates the index of the current repetition.";
std::string const GenomeCurrentRepetitionTooltip =
"The cell network encoded in the genome can be repeatedly built by specifying a number of "
"repetitions. This value indicates the index of the current repetition.";

std::string const GenomeCurrentCellTooltip = "The sequence number of the cell in the genome that will be constructed next.";

std::string const CellInjectorCounterTooltip =
"When a genome injection is initiated, the counter increments after each consecutive successful activation of the injector. Once the counter reaches a "
Expand Down
7 changes: 3 additions & 4 deletions source/Gui/InspectorWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ void _InspectorWindow::processCellGenomeTab(Description& desc)
.name("Number of branches")
.textWidth(GenomeTabTextWidth)
.readOnly(true)
.tooltip(""),
.tooltip(Const::GenomeNumBranchesTooltip),
numBranches);

auto numRepetitions = genomeDesc.header.numRepetitions;
Expand All @@ -444,7 +444,7 @@ void _InspectorWindow::processCellGenomeTab(Description& desc)
.textWidth(GenomeTabTextWidth)
.infinity(true)
.readOnly(true)
.tooltip(Const::GenomeRepetitionsPerConstructionTooltip),
.tooltip(Const::GenomeRepetitionsPerBranchTooltip),
numRepetitions);

auto numNodes = toInt(genomeDesc.cells.size());
Expand All @@ -460,8 +460,7 @@ void _InspectorWindow::processCellGenomeTab(Description& desc)
AlienImGui::InputInt(
AlienImGui::InputIntParameters()
.name("Current branch index")
.textWidth(GenomeTabTextWidth)
.tooltip(""),
.textWidth(GenomeTabTextWidth).tooltip(Const::GenomeCurrentBranchTooltip),
desc.currentBranch);
AlienImGui::InputInt(
AlienImGui::InputIntParameters()
Expand Down
39 changes: 17 additions & 22 deletions source/Gui/SimulationParametersWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,17 +256,7 @@ void _SimulationParametersWindow::processBase(
"Genome complexities",
"Single cell function",
"All cell functions"})
.tooltip("Here, one can set how the cells are to be colored during rendering. \n\n"
ICON_FA_CHEVRON_RIGHT " Energy: The more energy a cell has, the brighter it is displayed. A grayscale is used.\n\n"
ICON_FA_CHEVRON_RIGHT " Standard cell colors: Each cell is assigned one of 7 default colors, which is displayed with this option. \n\n"
ICON_FA_CHEVRON_RIGHT " Mutants: Different mutants are represented by different colors (only larger structural mutations such as translations or duplications are taken into account).\n\n"
ICON_FA_CHEVRON_RIGHT " Mutants and cell functions: Combination of mutants and cell function coloring.\n\n"
ICON_FA_CHEVRON_RIGHT " Cell states: green = under construction, blue = ready, red = dying\n\n"
ICON_FA_CHEVRON_RIGHT " Genome complexities: This property can be utilized by attacker cells when the parameter 'Complex genome protection' is "
"activated (see tooltip there). The coloring is as follows: blue = creature with low bonus (usually small or simple genome structure), red = large bonus\n\n"
ICON_FA_CHEVRON_RIGHT " Single cell function: A specific type of cell function can be highlighted, which is selected in the next parameter.\n\n"
ICON_FA_CHEVRON_RIGHT " All cell functions: The cells are colored according to their cell function.\n\n"
),
.tooltip(Const::ColoringParameterTooltip),
parameters.cellColoring);
if (parameters.cellColoring == CellColoring_CellFunction) {
AlienImGui::Switcher(
Expand Down Expand Up @@ -522,7 +512,6 @@ void _SimulationParametersWindow::processBase(
AlienImGui::SliderFloat(
AlienImGui::SliderFloatParameters()
.name("Absorption factor")
.tooltip("")
.textWidth(RightColumnWidth)
.logarithmic(true)
.colorDependence(true)
Expand All @@ -547,7 +536,6 @@ void _SimulationParametersWindow::processBase(
AlienImGui::SliderInt(
AlienImGui::SliderIntParameters()
.name("Radiation type I: Minimum age")
.tooltip("")
.textWidth(RightColumnWidth)
.colorDependence(true)
.infinity(true)
Expand Down Expand Up @@ -1004,7 +992,6 @@ void _SimulationParametersWindow::processBase(
.logarithmic(true)
.max(100000)
.textWidth(RightColumnWidth)
.tooltip("")
.defaultValue(toVector<MAX_COLORS, MAX_COLORS>(origParameters.cellFunctionInjectorDurationColorMatrix))
.tooltip("The number of activations an injector cell requires to infect another cell. One activation usually takes 6 time steps. The row "
"number determines the color of the injector cell, while the column number corresponds to the color of the infected cell."),
Expand Down Expand Up @@ -1173,7 +1160,7 @@ void _SimulationParametersWindow::processBase(
.max(1.0f)
.format("%.2f")
.defaultValue(origParameters.genomeComplexitySizeFactor)
.tooltip(""),
.tooltip("This parameter controls how the genome size influences the calculation of its complexity."),
parameters.genomeComplexitySizeFactor);
AlienImGui::SliderFloat(
AlienImGui::SliderFloatParameters()
Expand Down Expand Up @@ -1277,7 +1264,7 @@ void _SimulationParametersWindow::processBase(
.min(0)
.max(1.0f)
.defaultValue(toVector<MAX_COLORS, MAX_COLORS>(origParameters.cellFunctionAttackerSameMutantPenalty))
.tooltip(""),
.tooltip("A high value protects new mutants with equal or greater genome complexity from being attacked."),
parameters.cellFunctionAttackerArisingComplexMutantPenalty);
AlienImGui::SliderFloat(
AlienImGui::SliderFloatParameters()
Expand Down Expand Up @@ -1463,7 +1450,7 @@ void _SimulationParametersWindow::processBase(
.disabledValue(parameters.cellInactiveMaxAge)
.defaultEnabledValue(&origParameters.cellInactiveMaxAgeActivated)
.defaultValue(origParameters.cellInactiveMaxAge)
.tooltip(""),
.tooltip("Here, you can set the maximum age for a cell whose function or those of its neighbors have not been triggered."),
parameters.cellInactiveMaxAge,
&parameters.cellInactiveMaxAgeActivated);
AlienImGui::SliderInt(
Expand Down Expand Up @@ -1504,7 +1491,7 @@ void _SimulationParametersWindow::processBase(
"Genome complexities",
"Single cell function",
"All cell functions"})
.tooltip(""),
.tooltip(Const::ColoringParameterTooltip),
parameters.cellGlowColoring);
AlienImGui::SliderFloat(
AlienImGui::SliderFloatParameters()
Expand All @@ -1513,7 +1500,7 @@ void _SimulationParametersWindow::processBase(
.min(1.0f)
.max(8.0f)
.defaultValue(&origParameters.cellGlowRadius)
.tooltip(""),
.tooltip("The radius of the glow. Please note that a large radius affects the performance."),
&parameters.cellGlowRadius);
AlienImGui::SliderFloat(
AlienImGui::SliderFloatParameters()
Expand All @@ -1522,7 +1509,7 @@ void _SimulationParametersWindow::processBase(
.min(0)
.max(1.0f)
.defaultValue(&origParameters.cellGlowStrength)
.tooltip(""),
.tooltip("The strength of the glow."),
&parameters.cellGlowStrength);
AlienImGui::EndTreeNode();
}
Expand Down Expand Up @@ -2203,7 +2190,11 @@ void _SimulationParametersWindow::processAddonList(
.tooltip("It contains further settings that influence how much energy can be obtained from an attack by attacker cells."),
parameters.features.advancedAttackerControl);
AlienImGui::Checkbox(
AlienImGui::CheckboxParameters().name("Cell age limiter").textWidth(0).defaultValue(origParameters.features.cellAgeLimiter).tooltip(""),
AlienImGui::CheckboxParameters()
.name("Cell age limiter")
.textWidth(0)
.defaultValue(origParameters.features.cellAgeLimiter)
.tooltip("It enables additional possibilities to control the maximal cell age."),
parameters.features.cellAgeLimiter);
AlienImGui::Checkbox(
AlienImGui::CheckboxParameters()
Expand All @@ -2213,7 +2204,11 @@ void _SimulationParametersWindow::processAddonList(
.tooltip("This can be used to define color transitions for cells depending on their age."),
parameters.features.cellColorTransitionRules);
AlienImGui::Checkbox(
AlienImGui::CheckboxParameters().name("Cell glow").textWidth(0).defaultValue(origParameters.features.cellGlow).tooltip(""),
AlienImGui::CheckboxParameters()
.name("Cell glow")
.textWidth(0)
.defaultValue(origParameters.features.cellGlow)
.tooltip("It enables an additional rendering step that makes the cells glow."),
parameters.features.cellGlow);
AlienImGui::Checkbox(
AlienImGui::CheckboxParameters()
Expand Down

0 comments on commit e29bba6

Please sign in to comment.