Skip to content

Commit

Permalink
fiddle installer
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbudda committed Jul 3, 2016
1 parent 32d602d commit 0d60c69
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions installer/Installer.java
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,14 @@ public void actionPerformed(ActionEvent e)
}
}

private class updateActionP extends AbstractAction
{
@Override
public void actionPerformed(ActionEvent e)
{
updateInstructions();
}
}


public Installer(File targetDir)
Expand Down Expand Up @@ -1341,7 +1349,10 @@ public Installer(File targetDir)
//forgePanel.add(forgeVersion);

// Profile creation / update support
createProfile = new JCheckBox("Add/update Vivecraft launcher profile", true);
createProfile = new JCheckBox("", true);
AbstractAction actp = new updateActionP();
actp.putValue(AbstractAction.NAME, "Create Vivecraft launcher profile");
createProfile.setAction(actp);
createProfile.setAlignmentX(LEFT_ALIGNMENT);
createProfile.setSelected(true);
createProfile.setToolTipText(
Expand Down Expand Up @@ -1401,7 +1412,7 @@ public Installer(File targetDir)
instructions.setAlignmentX(CENTER_ALIGNMENT);
instructions.setAlignmentY(TOP_ALIGNMENT);
instructions.setForeground(Color.RED);
instructions.setPreferredSize(new Dimension(20, 20));
instructions.setPreferredSize(new Dimension(20, 40));
this.add(instructions);


Expand All @@ -1428,18 +1439,22 @@ public Installer(File targetDir)

this.setAlignmentX(LEFT_ALIGNMENT);
updateFilePath();
updateInstructions();
}


private void updateInstructions(){
String out = "";
if (useForge.isSelected() && !useShadersMod.isSelected()){
// out += "Please make sure that ShadersModCore is NOT in your Forge mods folder!";
String out = "<html>";
if(createProfile.isSelected()){
out += "Please make sure the Minecraft Launcher is not running.";
}
if (useForge.isSelected()){
out += "<br>Please make sure Forge has been installed first.";
}
if (useForge.isSelected() && useShadersMod.isSelected()){
// out += "Please make sure that ShadersModCore is NOT in your Forge mods folder!";
}

out+="</html>";
instructions.setText(out);

}
Expand Down

0 comments on commit 0d60c69

Please sign in to comment.