hiscoreplugin: show skill details on hover instead of click

This commit is contained in:
Lotto
2018-02-27 20:50:39 +01:00
parent 326f498ae9
commit 5c7c882ecb

View File

@@ -351,12 +351,11 @@ public class HiscorePanel extends PluginPanel
log.warn(null, ex); log.warn(null, ex);
} }
// Show skill details on click // Show skill details on hover
label.addMouseListener(new MouseInputAdapter() label.addMouseListener(new MouseInputAdapter()
{ {
// mouseReleased feels better than mouseClick UX-wise
@Override @Override
public void mouseReleased(MouseEvent e) public void mouseEntered(MouseEvent e)
{ {
JLabel source = (JLabel) e.getSource(); JLabel source = (JLabel) e.getSource();
String skillName = (String) source.getClientProperty(SKILL_NAME); String skillName = (String) source.getClientProperty(SKILL_NAME);