From e29bba6dd1c7459723dfc4eff458fa16ef4ed01d Mon Sep 17 00:00:00 2001 From: Christian Heinemann Date: Wed, 19 Jun 2024 20:55:42 +0200 Subject: [PATCH] further missing tooltips added --- source/Gui/GenomeEditorWindow.cpp | 2 +- source/Gui/HelpStrings.h | 28 +++++++++++++--- source/Gui/InspectorWindow.cpp | 7 ++-- source/Gui/SimulationParametersWindow.cpp | 39 ++++++++++------------- 4 files changed, 44 insertions(+), 32 deletions(-) diff --git a/source/Gui/GenomeEditorWindow.cpp b/source/Gui/GenomeEditorWindow.cpp index 6a7ecf1f9..28dc42f41 100644 --- a/source/Gui/GenomeEditorWindow.cpp +++ b/source/Gui/GenomeEditorWindow.cpp @@ -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(); diff --git a/source/Gui/HelpStrings.h b/source/Gui/HelpStrings.h index 25f4532e3..bd104cf78 100644 --- a/source/Gui/HelpStrings.h +++ b/source/Gui/HelpStrings.h @@ -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)."; @@ -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) { @@ -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 " diff --git a/source/Gui/InspectorWindow.cpp b/source/Gui/InspectorWindow.cpp index 32839bfe0..4f0f2228c 100644 --- a/source/Gui/InspectorWindow.cpp +++ b/source/Gui/InspectorWindow.cpp @@ -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; @@ -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()); @@ -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() diff --git a/source/Gui/SimulationParametersWindow.cpp b/source/Gui/SimulationParametersWindow.cpp index ffb24d56a..295109cf2 100644 --- a/source/Gui/SimulationParametersWindow.cpp +++ b/source/Gui/SimulationParametersWindow.cpp @@ -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( @@ -522,7 +512,6 @@ void _SimulationParametersWindow::processBase( AlienImGui::SliderFloat( AlienImGui::SliderFloatParameters() .name("Absorption factor") - .tooltip("") .textWidth(RightColumnWidth) .logarithmic(true) .colorDependence(true) @@ -547,7 +536,6 @@ void _SimulationParametersWindow::processBase( AlienImGui::SliderInt( AlienImGui::SliderIntParameters() .name("Radiation type I: Minimum age") - .tooltip("") .textWidth(RightColumnWidth) .colorDependence(true) .infinity(true) @@ -1004,7 +992,6 @@ void _SimulationParametersWindow::processBase( .logarithmic(true) .max(100000) .textWidth(RightColumnWidth) - .tooltip("") .defaultValue(toVector(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."), @@ -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() @@ -1277,7 +1264,7 @@ void _SimulationParametersWindow::processBase( .min(0) .max(1.0f) .defaultValue(toVector(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() @@ -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, ¶meters.cellInactiveMaxAgeActivated); AlienImGui::SliderInt( @@ -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() @@ -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."), ¶meters.cellGlowRadius); AlienImGui::SliderFloat( AlienImGui::SliderFloatParameters() @@ -1522,7 +1509,7 @@ void _SimulationParametersWindow::processBase( .min(0) .max(1.0f) .defaultValue(&origParameters.cellGlowStrength) - .tooltip(""), + .tooltip("The strength of the glow."), ¶meters.cellGlowStrength); AlienImGui::EndTreeNode(); } @@ -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() @@ -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()