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

Add a tooltip to each label and image with the description of the pack or mod. #44

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ public void addModPanel(int modPos, int pos) throws IOException {
Name.setPreferredSize(new Dimension(150, 67));
Name.setMinimumSize(new Dimension(150, 67));
Name.setText(mod.getDisplay());
Name.setToolTipText(mod.getDescription());
gbc = new GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = 0;
Expand All @@ -292,6 +293,7 @@ public void addModPanel(int modPos, int pos) throws IOException {
JLabel Image = new JLabel();
Image.setHorizontalAlignment(SwingConstants.LEFT);
Image.setHorizontalTextPosition(SwingConstants.TRAILING);
Image.setToolTipText(mod.getDescription());
BufferedImage icon;
if (mod.icon != null) {
if (new File(SkyclientUniversal.cache, mod.getIcon()).exists()) {
Expand Down Expand Up @@ -450,6 +452,7 @@ public void addPackPanel(int packPos, int pos) throws IOException {
Name.setPreferredSize(new Dimension(150, 67));
Name.setMinimumSize(new Dimension(150, 67));
Name.setText(pack.getDisplay());
Name.setToolTipText(pack.getDescription());
gbc = new GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = 0;
Expand All @@ -458,6 +461,7 @@ public void addPackPanel(int packPos, int pos) throws IOException {
JLabel Image = new JLabel();
Image.setHorizontalAlignment(SwingConstants.LEFT);
Image.setHorizontalTextPosition(SwingConstants.TRAILING);
Image.setToolTipText(pack.getDescription());
BufferedImage icon;
if (new File(SkyclientUniversal.cache, pack.getIcon()).exists()) {
icon = resize(ImageIO.read(new File(SkyclientUniversal.cache, pack.getIcon())), 50, 50, Objects.equals(pack.icon_scaling, "pixel"));
Expand Down
Loading