Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tooltip for Skill level calculation #112

merged 1 commit into from Jul 12, 2019


Copy link

commented Jul 11, 2019

This is the first of a few tooltip PRs. I just did Skill (and Technique) in this PR so you can see how it is done. Future PRs will cover Spells and WeaponDamage.

  1. Bonus received a "parent" variable. This is the ListRow subclass that is providing the aforementioned bonus. This variable is in essence, transient, since it is not read in from or streamed out to XML.

  2. PrerequisitesThread now stores the "parent" into the Bonus as it is being added to the character's feature map.

  3. SkillLevel was modified to accept a StringBuilder as its toolTip parameter, instead of a String (but it still only stores the String). This allowed me to refactor the internationalized strings so they only exist in the SkillLevel class, instead of the ListRow subclasses.

  4. GURPSCharacter was modified to accept the toolTip StringBuilder for a few of the "getBonus" methods. If the bonus applies to the criteria, it will add itself to the toolTip.

  5. Skill was modified to create the toolTip StringBuilder while calculating its level and pass it to the GURPSCharacter "getBonus" methods.

  6. And finally, SkillColumn was modified to allow a "level" tooltip for the LEVEL and RELATIVE_LEVEL columns.

If you accept all of these changes, you will see toolTips appear on a Skill, over the SL and RSL columns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.