Uploaded image for project: 'Minecraft Launcher'
  1. Minecraft Launcher
  2. MCL-1410

Help links don't appear to be clickable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.2.5
    • 1.2.1
    • None
    • None
    • Confirmed

      The "(Which should I use?)" and "(Forgot password?)" links under the text fields don't appear to be hyperlinks when you mouse over them. Normally you'd expect the cursor to change into the pointing hand and the link text to underline, instead the cursor and text just stay the same.

      In Java you can do something like this to achieve the desired effect (supposing the links are JLabels):

      LauncherFrame.java
          link.setCursor(new Cursor(Cursor.HAND_CURSOR)); //link is a JLabel
          link.addMouseListener(new MouseAdapter()
          {
              public void mouseExited(MouseEvent arg0)
              {
                  link.setText("<HTML><FONT color=\"#000099\">"+text+"</FONT></HTML>");
              }
      
              public void mouseEntered(MouseEvent arg0)
              {
                  link.setText("<HTML><FONT color=\"#000099\"><U>"+text+"</U></FONT></HTML>"); //Underlined
              }
      
              public void mouseClicked(MouseEvent arg0)
              {
                  if (Desktop.isDesktopSupported())
                  {
                      try
                      {
                          Desktop.getDesktop().browse(urlToOpen);
                      }
                      catch (Exception e)
                      {
                          e.printStackTrace();
                      }
                  }
                  else
                  {
                      new JOptionPane("Could not open link.").createDialog(new JFrame(), "").setVisible(true); //Change "new JFrame()" to the launcher's frame
                  }
              }
          });
      

      It feels weird for me since we're dealing with links yet they don't seem like links. I would expect them to be a bit more responsive.

      This is purely cosmetic.

            dinnerbone [Mojang] Nathan Adams
            moomoohk Meshulam Silk
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: