Skip to content

Commit

Permalink
tooltips added
Browse files Browse the repository at this point in the history
  • Loading branch information
chrxh committed Aug 31, 2024
1 parent f641a1a commit e01a89d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
12 changes: 7 additions & 5 deletions source/Gui/HelpStrings.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ namespace Const
"#0: The strength of the movement, bending or expansion/contraction. A negative sign corresponds to the opposite "
"action.\n\n" ICON_FA_CHEVRON_RIGHT " Input channel #1: This channel is solely utilized for acceleration due to bending. If the sign of channel #1 "
"differs from the sign of channel #0, no acceleration will be obtained during the bending process.\n\n " ICON_FA_CHEVRON_RIGHT
" Input channel #3: This channel is used for muscles in movement mode. It allows to determine the relative angle of the movement. A value of -0.5 "
" Input channel #3: This channel is used for muscles in movement mode. It contains the relative angle of the movement with respect to a "
"detected object. The object must have been targeted from a sensor cell from which the input signal originates (it does not have to be an adjacent cell). A value of -0.5 "
"correspond to -180 deg and +0.5 to +180 deg.";

std::string const DefenderTooltip =
Expand Down Expand Up @@ -241,8 +242,9 @@ namespace Const
"The duration of the injection process depends on the simulation parameter 'Injection time'.";

std::string const GenomeMuscleModeTooltip = ICON_FA_CHEVRON_RIGHT
" Movement: Results in movement in the direction (or counter-direction) determined by the path from the "
"input cell to the muscle cell.\n\n" ICON_FA_CHEVRON_RIGHT " Expansion and contraction: Causes an elongation (or contraction) of the "
" Movement to sensor target: A movement can be performed if the input signal has its origin in a sensor cell which has previously detected a "
"target. The direction of movement is specified relative to the target.\n\n" ICON_FA_CHEVRON_RIGHT
" Expansion and contraction: Causes an elongation (or contraction) of the "
"reference distance to the input cell.\n\n" ICON_FA_CHEVRON_RIGHT " Bending: Increases (or decreases) the angle between the muscle "
"cell, input cell, and the nearest connected cell clockwise from the muscle cell.";

Expand Down Expand Up @@ -452,8 +454,8 @@ namespace Const
"during the bending process.",
"The following cell functions obtain their input from channel #2:\n\n" ICON_FA_CHEVRON_RIGHT " Neuron",
"The following cell functions obtain their input from channel #3:\n\n" ICON_FA_CHEVRON_RIGHT " Neuron\n\n" ICON_FA_CHEVRON_RIGHT
" Muscle: This channel is used for muscles in movement mode. It allows to determine the relative angle of the movement. A value of -0.5 correspond to "
"-180 deg and +0.5 to +180 deg.",
" Muscle: This channel is used for muscles in movement mode. It allows to determine the relative angle of the movement with respect to a previously "
"detected target from a sensor cell. A value of -0.5 correspond to -180 deg and +0.5 to +180 deg.",
"The following cell functions obtain their input from channel #4:\n\n" ICON_FA_CHEVRON_RIGHT " Neuron",
"The following cell functions obtain their input from channel #5:\n\n" ICON_FA_CHEVRON_RIGHT " Neuron",
"The following cell functions obtain their input from channel #6:\n\n" ICON_FA_CHEVRON_RIGHT " Neuron",
Expand Down
14 changes: 10 additions & 4 deletions source/Gui/SimulationParametersWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1544,7 +1544,7 @@ void _SimulationParametersWindow::processBase()
.max(20.0f)
.format("%.1f")
.defaultValue(origParameters.genomeComplexityNeuronFactor)
.tooltip(""),
.tooltip("This parameter takes into account the number of encoded neurons in the genome for the complexity value."),
parameters.genomeComplexityNeuronFactor);
AlienImGui::EndTreeNode();
}
Expand All @@ -1554,14 +1554,17 @@ void _SimulationParametersWindow::processBase()
* Addon: Legacy modes
*/
if (parameters.features.legacyModes) {
if (AlienImGui::BeginTreeNode(AlienImGui::TreeNodeParameters().text("Addon: Legacy modes"))) {
if (AlienImGui::BeginTreeNode(AlienImGui::TreeNodeParameters().text("Addon: Legacy features"))) {
AlienImGui::Switcher(
AlienImGui::SwitcherParameters()
.name("Muscle movement modes")
.textWidth(RightColumnWidth)
.defaultValue(origParameters.legacyCellFunctionMuscleMovementMode)
.values({"Unrestricted", "Fetch angle from sensor"})
.tooltip(""),
.tooltip(ICON_FA_CHEVRON_RIGHT " Unrestricted: Muscle cells can move in all directions when set in 'Movement' mode. The relative "
"angle is provided in channel #3.\n\n" ICON_FA_CHEVRON_RIGHT
" Fetch angle from sensor: Muscle cells can move only if an adjacent sensor cell has previously "
"detected a target. The relative angle in relation to the target is provided in channel #3."),
parameters.legacyCellFunctionMuscleMovementMode,
&parameters.legacyCellFunctionMuscleMovementModeActivated);
AlienImGui::EndTreeNode();
Expand Down Expand Up @@ -2364,7 +2367,7 @@ void _SimulationParametersWindow::processAddonList()
parameters.features.genomeComplexityMeasurement);
AlienImGui::Checkbox(
AlienImGui::CheckboxParameters()
.name("Legacy modes")
.name("Legacy features")
.textWidth(0)
.defaultValue(origFeatures.legacyModes)
.tooltip("It contains features for compatibility with older versions."),
Expand Down Expand Up @@ -2472,6 +2475,9 @@ void _SimulationParametersWindow::validationAndCorrection(SimulationParameters&
std::max(0.0f, std::min(1.0f, parameters.baseValues.radiationAbsorptionLowGenomeComplexityPenalty[i]));
parameters.baseValues.radiationAbsorptionLowVelocityPenalty[i] =
std::max(0.0f, std::min(1.0f, parameters.baseValues.radiationAbsorptionLowVelocityPenalty[i]));
parameters.genomeComplexitySizeFactor[i] = std::max(0.0f, parameters.genomeComplexitySizeFactor[i]);
parameters.genomeComplexityRamificationFactor[i] = std::max(0.0f, parameters.genomeComplexityRamificationFactor[i]);
parameters.genomeComplexityNeuronFactor[i] = std::max(0.0f, parameters.genomeComplexityNeuronFactor[i]);
}
parameters.externalEnergy = std::max(0.0f, parameters.externalEnergy);
parameters.baseValues.cellMaxBindingEnergy = std::max(10.0f, parameters.baseValues.cellMaxBindingEnergy);
Expand Down

0 comments on commit e01a89d

Please sign in to comment.