From 23a05d1299e7fc68886510662a9f48e58b92310a Mon Sep 17 00:00:00 2001 From: Matrix89 Date: Fri, 24 Mar 2017 18:14:30 +0200 Subject: [PATCH] Add clear console button --- .../java/com/skcraft/launcher/dialog/ConsoleFrame.java | 8 ++++++++ .../com/skcraft/launcher/lang/Launcher.properties | 1 + 2 files changed, 9 insertions(+) diff --git a/launcher/src/main/java/com/skcraft/launcher/dialog/ConsoleFrame.java b/launcher/src/main/java/com/skcraft/launcher/dialog/ConsoleFrame.java index 7903ac3..bdd5dd1 100644 --- a/launcher/src/main/java/com/skcraft/launcher/dialog/ConsoleFrame.java +++ b/launcher/src/main/java/com/skcraft/launcher/dialog/ConsoleFrame.java @@ -81,13 +81,21 @@ public class ConsoleFrame extends JFrame { */ private void initComponents() { JButton pastebinButton = new JButton(SharedLocale.tr("console.uploadLog")); + JButton clearLogButton = new JButton(SharedLocale.tr("console.clearLog")); buttonsPanel = new LinedBoxPanel(true); buttonsPanel.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8)); buttonsPanel.addElement(pastebinButton); + buttonsPanel.addElement(clearLogButton); add(buttonsPanel, BorderLayout.NORTH); add(messageLog, BorderLayout.CENTER); + clearLogButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + messageLog.clear(); + } + }); pastebinButton.addActionListener(new ActionListener() { @Override diff --git a/launcher/src/main/resources/com/skcraft/launcher/lang/Launcher.properties b/launcher/src/main/resources/com/skcraft/launcher/lang/Launcher.properties index 0e9a59a..99c31e4 100644 --- a/launcher/src/main/resources/com/skcraft/launcher/lang/Launcher.properties +++ b/launcher/src/main/resources/com/skcraft/launcher/lang/Launcher.properties @@ -125,6 +125,7 @@ console.closeWindow=Close Window console.hideWindow=Hide Window console.confirmKill=Are sure that you wish to close the game forcefully? You may lose data. console.confirmKillTitle=Are you sure? +console.clearLog=Clear downloader.downloadingItem=Downloading {0}... downloader.downloadingList=Downloading {0} files... ({1} remaining, {2} failed)