Skip to content

Commit

Permalink
Merge pull request #188 from Matrix89/master
Browse files Browse the repository at this point in the history
Add clear console button.
  • Loading branch information
sk89q authored Nov 11, 2017
2 parents a31081e + 23a05d1 commit 768f7a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,21 @@ public void windowClosing(WindowEvent event) {
*/
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 768f7a5

Please sign in to comment.