-
Notifications
You must be signed in to change notification settings - Fork 1
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
add: add option to format the star text in the list #1
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,7 +131,16 @@ private class StarAssistPanelRow extends JPanel { | |
|
||
setToolTipText(tooltipText.toString()); | ||
|
||
final String text = "T" + star.getTier().getSize() + " W" + star.getWorld() + " " + star.getLocation(); | ||
final String text = this.config.callOutFormat | ||
|
||
if(text.contains("{world}") && text.contains("{tier}") && text.contains("{location}")){ // if provided format is valid | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this codebase I use spaces before and after keywords, so this should be |
||
text.replace("{world}", star.getWorld()); | ||
text.replace("{tier}", "T"+star.getTier().getSize()); | ||
text.replace("{location}", star.getLocation()); | ||
}else{ // otherwise default | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. spaces: |
||
text = "T" + star.getTier().getSize() + " W" + star.getWorld() + " " + star.getLocation(); | ||
} | ||
|
||
final JLabel textLabel = new JLabel(text); | ||
textLabel.setFont(FontManager.getRunescapeSmallFont()); | ||
add(textLabel); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be "W{world} T{tier} {location}" then, right?