Commit 4c15991b authored by superblaubeere27's avatar superblaubeere27

Fixed Issues

parent b9b7e49d
......@@ -203,7 +203,7 @@ public class LiquidLauncher {
} catch (Exception e) {
if (DEVEL_VERSION) {
clientBuilds = new ArrayList<>();
clientBuilds.add(new ClientBuild("", "", "", "1.8.9", "b26.2", "54beaca4e07fe665676048227408c498", "LiquidBounce-1.8"));
clientBuilds.add(new ClientBuild("", "", "https://example.org/", "1.8.9", "b26.2", "54beaca4e07fe665676048227408c498", "LiquidBounce-1.8"));
}
fatalError("Failed to load LiquidBounce versions: " + e);
}
......
......@@ -49,7 +49,7 @@
</grid>
</children>
</grid>
<grid id="e3588" layout-manager="GridLayoutManager" row-count="4" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="e3588" layout-manager="GridLayoutManager" row-count="4" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
......@@ -70,12 +70,12 @@
</component>
<vspacer id="c41be">
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
<grid row="3" column="0" row-span="1" col-span="2" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<component id="af50" class="javax.swing.JTextField" binding="fileField">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<grid row="1" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
......@@ -83,7 +83,7 @@
</component>
<component id="eb32d" class="javax.swing.JButton" binding="browseButton" default-binding="true">
<constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<grid row="1" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="tanslations" key="browse"/>
......@@ -91,12 +91,20 @@
</component>
<component id="d515" class="javax.swing.JLabel">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="2" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="tanslations" key="liquidBounceDnD"/>
</properties>
</component>
<component id="bca82" class="javax.swing.JTextField" binding="dlLink">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
<properties/>
</component>
</children>
</grid>
<component id="91fde" class="javax.swing.JLabel">
......
......@@ -3,10 +3,12 @@ package net.ccbluex.LiquidLauncher.ui;
import com.intellij.uiDesigner.core.GridConstraints;
import com.intellij.uiDesigner.core.GridLayoutManager;
import com.intellij.uiDesigner.core.Spacer;
import net.ccbluex.LiquidLauncher.LiquidLauncher;
import net.ccbluex.LiquidLauncher.utils.Utils;
import org.apache.commons.codec.digest.DigestUtils;
import javax.swing.*;
import javax.swing.filechooser.FileFilter;
import java.awt.*;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
......@@ -32,6 +34,7 @@ public class AddLiquidBounceDialog extends JDialog {
private JTextField fileField;
private JButton browseButton;
private JLabel dlLabel;
private JTextField dlLink;
private String file = "";
{
......@@ -42,6 +45,8 @@ public class AddLiquidBounceDialog extends JDialog {
}
public AddLiquidBounceDialog(final String downloadLink, final String hash) {
super(LiquidLauncher.menuInterface);
setLocationRelativeTo(LiquidLauncher.menuInterface);
setAlwaysOnTop(true);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
this.hash = hash;
......@@ -49,7 +54,7 @@ public class AddLiquidBounceDialog extends JDialog {
setModal(true);
setTitle("Add LiquidBounce");
pack();
dlLabel.setText(dlLabel.getText().replace("%download%", downloadLink));
dlLink.setText(downloadLink);
DropTarget target = new DropTarget(this, new DropTargetListener() {
@Override
public void dragEnter(DropTargetDragEvent dtde) {
......@@ -148,7 +153,17 @@ public class AddLiquidBounceDialog extends JDialog {
}
browseButton.addActionListener(e -> {
String s = Utils.chooseFile(null, AddLiquidBounceDialog.this);
String s = Utils.chooseFile(null, AddLiquidBounceDialog.this, new FileFilter() {
@Override
public boolean accept(File f) {
return f.getName().toLowerCase().endsWith(".zip") || f.isDirectory();
}
@Override
public String getDescription() {
return "Zip file (*.zip)";
}
});
if (s != null)
fileField.setText(s);
......@@ -220,22 +235,24 @@ public class AddLiquidBounceDialog extends JDialog {
this.$$$loadButtonText$$$(buttonCancel, ResourceBundle.getBundle("tanslations").getString("cancel"));
panel2.add(buttonCancel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JPanel panel3 = new JPanel();
panel3.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));
panel3.setLayout(new GridLayoutManager(4, 3, new Insets(0, 0, 0, 0), -1, -1));
contentPane.add(panel3, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
dlLabel = new JLabel();
this.$$$loadLabelText$$$(dlLabel, ResourceBundle.getBundle("tanslations").getString("liquidBounceDownloadLabel"));
dlLabel.putClientProperty("html.disable", Boolean.FALSE);
panel3.add(dlLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final Spacer spacer2 = new Spacer();
panel3.add(spacer2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
panel3.add(spacer2, new GridConstraints(3, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
fileField = new JTextField();
panel3.add(fileField, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
panel3.add(fileField, new GridConstraints(1, 0, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
browseButton = new JButton();
this.$$$loadButtonText$$$(browseButton, ResourceBundle.getBundle("tanslations").getString("browse"));
panel3.add(browseButton, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
panel3.add(browseButton, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label1 = new JLabel();
this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle("tanslations").getString("liquidBounceDnD"));
panel3.add(label1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
panel3.add(label1, new GridConstraints(2, 0, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
dlLink = new JTextField();
panel3.add(dlLink, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
final JLabel label2 = new JLabel();
label2.setFont(new Font(label2.getFont().getName(), label2.getFont().getStyle(), 48));
this.$$$loadLabelText$$$(label2, ResourceBundle.getBundle("tanslations").getString("addLiquidBounce"));
......
......@@ -32,9 +32,10 @@ public class AddModDialog extends JDialog {
}
public AddModDialog(ConfigureModsForm modsForm) {
setAlwaysOnTop(true);
super(LiquidLauncher.menuInterface);
setLocationRelativeTo(LiquidLauncher.menuInterface);
// setAlwaysOnTop(true);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setLocationRelativeTo(null);
this.modsForm = modsForm;
setContentPane(contentPane);
setModal(true);
......
......@@ -36,13 +36,13 @@ public class ConfigureModsForm extends JDialog {
}
public ConfigureModsForm(String clientVersion) {
super();
super(LiquidLauncher.menuInterface);
this.clientVersion = clientVersion;
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setSize(750, 375);
setTitle("Configure mods");
setLocationRelativeTo(null);
setAlwaysOnTop(true);
setLocationRelativeTo(LiquidLauncher.menuInterface);
// setAlwaysOnTop(true);
model = new ModsTableModel();
modsTable.setModel(model);
......
......@@ -28,6 +28,8 @@ public class EditAndViewConfigDialog extends JDialog {
}
public EditAndViewConfigDialog(File folder) {
super(LiquidLauncher.menuInterface);
setLocationRelativeTo(LiquidLauncher.menuInterface);
this.folder = folder;
setSize(500, 250);
setLocationRelativeTo(LiquidLauncher.liquidLauncher.menuInterface);
......
......@@ -43,6 +43,8 @@ public class ExportDialog extends JDialog {
}
public ExportDialog() {
super(LiquidLauncher.menuInterface);
setLocationRelativeTo(LiquidLauncher.menuInterface);
setContentPane(contentPane);
setModal(true);
pack();
......
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="net.ccbluex.LiquidLauncher.ui.ManageScriptsDialog">
<grid id="cbd77" binding="contentPane" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="10" left="10" bottom="10" right="10"/>
<constraints>
<xy x="48" y="54" width="455" height="297"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<grid id="94766" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<hspacer id="98af6">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
<grid id="9538f" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="e7465" class="javax.swing.JButton" binding="buttonOK">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="OK"/>
</properties>
</component>
</children>
</grid>
</children>
</grid>
<grid id="e3588" layout-manager="GridLayoutManager" row-count="5" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="45256" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<font size="48"/>
<text resource-bundle="tanslations" key="manage_scripts"/>
</properties>
</component>
<vspacer id="a9508">
<constraints>
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<component id="a6de0" class="javax.swing.JLabel">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Select script:"/>
</properties>
</component>
<component id="b0247" class="javax.swing.JComboBox" binding="scriptFile">
<constraints>
<grid row="2" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
</component>
<component id="68a88" class="javax.swing.JButton" binding="editButton" default-binding="true">
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Edit"/>
</properties>
</component>
<component id="8259e" class="javax.swing.JButton" binding="removeButton" default-binding="true">
<constraints>
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Remove"/>
</properties>
</component>
</children>
</grid>
</children>
</grid>
</form>
package net.ccbluex.LiquidLauncher.ui;
import com.intellij.uiDesigner.core.GridConstraints;
import com.intellij.uiDesigner.core.GridLayoutManager;
import com.intellij.uiDesigner.core.Spacer;
import net.ccbluex.LiquidLauncher.LiquidLauncher;
import javax.swing.*;
import java.awt.*;
import java.io.File;
import java.util.ResourceBundle;
public class ManageScriptsDialog extends JDialog {
private JPanel contentPane;
private JButton buttonOK;
private JComboBox scriptFile;
private JButton editButton;
private JButton removeButton;
private File scriptsFolder;
{
// GUI initializer generated by IntelliJ IDEA GUI Designer
// >>> IMPORTANT!! <<<
// DO NOT EDIT OR ADD ANY CODE HERE!
$$$setupUI$$$();
}
public ManageScriptsDialog(File scriptsFolder) {
super(LiquidLauncher.menuInterface);
setLocationRelativeTo(LiquidLauncher.menuInterface);
this.scriptsFolder = scriptsFolder;
setContentPane(contentPane);
setModal(true);
pack();
setLocationRelativeTo(null);
getRootPane().setDefaultButton(buttonOK);
buttonOK.addActionListener(e -> onOK());
updateComboBox();
removeButton.addActionListener(e -> {
updateComboBox();
new File(scriptsFolder, (String) scriptFile.getSelectedItem()).delete();
updateComboBox();
});
editButton.addActionListener(e -> {
updateComboBox();
if (Desktop.isDesktopSupported()) {
try {
Desktop.getDesktop().open(new File(scriptsFolder, (String) scriptFile.getSelectedItem()));
} catch (Exception e1) {
e1.printStackTrace();
}
}
updateComboBox();
});
}
private boolean updateComboBox() {
scriptFile.removeAllItems();
File[] scripts = scriptsFolder.listFiles((dir, name) -> name.toLowerCase().endsWith(".liquidscript") || name.toLowerCase().endsWith(".ls"));
if (scripts.length == 0) {
JOptionPane.showMessageDialog(this, "No scripts", "Warning", JOptionPane.WARNING_MESSAGE);
dispose();
throw new RuntimeException("No more scripts");
}
for (File script :
scripts) {
scriptFile.addItem(script.getName());
}
return true;
}
private void onOK() {
// add your code here
dispose();
}
/**
* Method generated by IntelliJ IDEA GUI Designer
* >>> IMPORTANT!! <<<
* DO NOT edit this method OR call it in your code!
*
* @noinspection ALL
*/
private void $$$setupUI$$$() {
contentPane = new JPanel();
contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));
final JPanel panel1 = new JPanel();
panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
final Spacer spacer1 = new Spacer();
panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
final JPanel panel2 = new JPanel();
panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
buttonOK = new JButton();
buttonOK.setText("OK");
panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JPanel panel3 = new JPanel();
panel3.setLayout(new GridLayoutManager(5, 2, new Insets(0, 0, 0, 0), -1, -1));
contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
final JLabel label1 = new JLabel();
label1.setFont(new Font(label1.getFont().getName(), label1.getFont().getStyle(), 48));
this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle("tanslations").getString("manage_scripts"));
panel3.add(label1, new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final Spacer spacer2 = new Spacer();
panel3.add(spacer2, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
final JLabel label2 = new JLabel();
label2.setText("Select script:");
panel3.add(label2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
scriptFile = new JComboBox();
panel3.add(scriptFile, new GridConstraints(2, 0, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
editButton = new JButton();
editButton.setText("Edit");
panel3.add(editButton, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
removeButton = new JButton();
removeButton.setText("Remove");
panel3.add(removeButton, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
}
/**
* @noinspection ALL
*/
private void $$$loadLabelText$$$(JLabel component, String text) {
StringBuffer result = new StringBuffer();
boolean haveMnemonic = false;
char mnemonic = '\0';
int mnemonicIndex = -1;
for (int i = 0; i < text.length(); i++) {
if (text.charAt(i) == '&') {
i++;
if (i == text.length()) break;
if (!haveMnemonic && text.charAt(i) != '&') {
haveMnemonic = true;
mnemonic = text.charAt(i);
mnemonicIndex = result.length();
}
}
result.append(text.charAt(i));
}
component.setText(result.toString());
if (haveMnemonic) {
component.setDisplayedMnemonic(mnemonic);
component.setDisplayedMnemonicIndex(mnemonicIndex);
}
}
/**
* @noinspection ALL
*/
public JComponent $$$getRootComponent$$$() {
return contentPane;
}
}
......@@ -348,7 +348,7 @@
</component>
</children>
</grid>
<grid id="dfd9a" layout-manager="GridLayoutManager" row-count="9" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="dfd9a" layout-manager="GridLayoutManager" row-count="10" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<tabbedpane title="LiquidBounce"/>
......@@ -366,7 +366,7 @@
</component>
<vspacer id="f854d">
<constraints>
<grid row="8" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
<grid row="9" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<component id="98e05" class="javax.swing.JButton" binding="importButton" default-binding="true">
......@@ -438,12 +438,28 @@
</component>
<component id="a8ecd" class="javax.swing.JButton" binding="importButton1" default-binding="true">
<constraints>
<grid row="7" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<grid row="7" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Import"/>
</properties>
</component>
<component id="21e33" class="javax.swing.JButton" binding="manageScriptsButton" default-binding="true">
<constraints>
<grid row="7" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Manage scripts"/>
</properties>
</component>
<component id="6e3c4" class="javax.swing.JButton" binding="downloadUserScriptsButton" default-binding="true">
<constraints>
<grid row="8" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Download UserScripts"/>
</properties>
</component>
</children>
</grid>
<grid id="d6117" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
......
......@@ -82,6 +82,8 @@ public class MenuInterface extends JFrame {
private JButton openButton;
private JButton copyPathButton;
private JButton importButton1;
private JButton manageScriptsButton;
private JButton downloadUserScriptsButton;
{
// GUI initializer generated by IntelliJ IDEA GUI Designer
......@@ -344,6 +346,10 @@ public class MenuInterface extends JFrame {
JOptionPane.showMessageDialog(MenuInterface.this, "Failed to import script: " + e1, "Error", JOptionPane.ERROR_MESSAGE);
}
});
manageScriptsButton.addActionListener(e -> {
LauncherFolderTree tree = LiquidLauncher.liquidLauncher.getLauncherFolderTree(LiquidLauncher.liquidLauncher.getClientBuild(minecraftVersion.getSelectedItem(), clientVersion.getSelectedItem()));
new ManageScriptsDialog(tree.getLiquidBounceFolder()).setVisible(true);
});
}
public void updatePaths() {
......@@ -660,13 +666,13 @@ public class MenuInterface extends JFrame {
this.$$$loadLabelText$$$(label12, ResourceBundle.getBundle("tanslations").getString("customFolder"));
panel3.add(label12, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JPanel panel4 = new JPanel();
panel4.setLayout(new GridLayoutManager(9, 2, new Insets(0, 0, 0, 0), -1, -1));
panel4.setLayout(new GridLayoutManager(10, 2, new Insets(0, 0, 0, 0), -1, -1));
tabbedPane1.addTab("LiquidBounce", panel4);
final JLabel label13 = new JLabel();
label13.setText("Settings:");
panel4.add(label13, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final Spacer spacer6 = new Spacer();
panel4.add(spacer6, new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
panel4.add(spacer6, new GridConstraints(9, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
importButton = new JButton();
importButton.setText("Import");
panel4.add(importButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
......@@ -694,7 +700,13 @@ public class MenuInterface extends JFrame {
panel4.add(label15, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
importButton1 = new JButton();
importButton1.setText("Import");
panel4.add(importButton1, new GridConstraints(7, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
panel4.add(importButton1, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
manageScriptsButton = new JButton();
manageScriptsButton.setText("Manage scripts");
panel4.add(manageScriptsButton, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
downloadUserScriptsButton = new JButton();
downloadUserScriptsButton.setText("Download UserScripts");
panel4.add(downloadUserScriptsButton, new GridConstraints(8, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JPanel panel5 = new JPanel();
panel5.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
tabbedPane1.addTab("Client Log", panel5);
......
configure_mods=Configure mods
email_password=E-Mail:Password
languageName=English
latestVersion=Latest version
launch=Launch
liquidbounce_version=LiquidBounce version:
login=Login
loginmsg_idle=Idle...
loginmsg_loginfailed=Login failed!
loginmsg_loginsuccesful=Login successful!
minecraft_version=Minecraft Version:
news=News
password=Password (Leave blank for Cracked)
remember_me=Remember Me
username_email=Username / E-Mail
waiting=Waiting...
resolution=Resulution:
jvmArgs=JVM Args:
jvmPath=JVM Path:
useLauncherJRE=Use launcher JRE
keepLauncher=Keep launcher running
settings=Settings
clientLog=Client log
autoScroll=Auto scroll
clear=Clear
ok=OK
cancel=Cancel
add=Add
remove=Remove
addMod=Add mod
modJar=Mod Jar
browse=Browse
addLiquidBounce=Add LiquidBounce
liquidBounceDownloadLabel=<html>Please download LiquidBounce from the download page: <input value="%download%"></input> Please do <strong>NOT</strong> extract the zip file!</html>
liquidBounceDnD=Or drag and drop the file into this frame
file_management=File management
folderArch=Which folder architecture?
custom=Custom
folder=Which folder?
customFolder=Custom folder:
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment