Skip to content

Commit

Permalink
Merge pull request #4082 from IllianiCBT/marriageableAndConceptionFla…
Browse files Browse the repository at this point in the history
…gVisibility

Updated Tooltips for the Marriageable & Trying to Conceive Flags
  • Loading branch information
HammerGS authored May 16, 2024
2 parents ebd9b54 + 77ad875 commit 7071247
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions MekHQ/resources/mekhq/resources/GUI.properties
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ miFounder.toolTipText=If this is selected then the person is a founding member o
miImmortal.text=Immortal
miImmortal.toolTipText=If this is selected then the person will not be processed during random death \n(standard checks still apply)
miMarriageable.text=Marriageable
miMarriageable.toolTipText=If this is selected then the person will be included as a potential spouse for marriages \n(standard checks still apply, so married personnel will not be included even if this flag is selected)
miMarriageable.toolTipText=If this is selected, then the person will be included as a potential spouse for marriages (married personnel will not be included even if this flag is selected, nor will characters under %s years old)
miTryingToConceive.text=Trying to Conceive
miTryingToConceive.toolTipText=If this is selected the person has a chance to have children created through random procreation. \n(standard checks still apply)
miTryingToConceive.toolTipText=If this is selected, the person has a chance to have children created through random procreation (this flag is ignored for personnel under 18 years old).
### Randomization Menu
randomizationMenu.text=Randomization
miRandomName.single.text=Randomize Name
Expand Down
5 changes: 3 additions & 2 deletions MekHQ/src/mekhq/gui/adapter/PersonnelTableMouseAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -2165,7 +2165,8 @@ protected Optional<JPopupMenu> createPopupMenu() {
|| !gui.getCampaign().getCampaignOptions().getRandomMarriageMethod().isNone())
&& Stream.of(selected).allMatch(p -> p.isMarriageable() == person.isMarriageable())) {
cbMenuItem = new JCheckBoxMenuItem(resources.getString("miMarriageable.text"));
cbMenuItem.setToolTipText(resources.getString("miMarriageable.toolTipText"));
cbMenuItem.setToolTipText(MultiLineTooltip.splitToolTip(String.format(resources.getString("miMarriageable.toolTipText"),
gui.getCampaign().getCampaignOptions().getMinimumMarriageAge()), 100));
cbMenuItem.setName("miMarriageable");
cbMenuItem.setSelected(person.isMarriageable());
cbMenuItem.addActionListener(evt -> {
Expand All @@ -2180,7 +2181,7 @@ protected Optional<JPopupMenu> createPopupMenu() {
&& Stream.of(selected).allMatch(p -> p.getGender().isFemale())
&& Stream.of(selected).allMatch(p -> p.isTryingToConceive() == person.isTryingToConceive())) {
cbMenuItem = new JCheckBoxMenuItem(resources.getString("miTryingToConceive.text"));
cbMenuItem.setToolTipText(resources.getString("miTryingToConceive.toolTipText"));
cbMenuItem.setToolTipText(MultiLineTooltip.splitToolTip(resources.getString("miTryingToConceive.toolTipText"), 100));
cbMenuItem.setName("miTryingToConceive");
cbMenuItem.setSelected(person.isTryingToConceive());
cbMenuItem.addActionListener(evt -> {
Expand Down

0 comments on commit 7071247

Please sign in to comment.