Skip to content

Commit 7a150eb

Browse files
committed
feat: Attach reset button and reset login in CodeXPService
1 parent 8cc1a37 commit 7a150eb

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed
Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,29 @@
11
package com.github.ilovegamecoding.intellijcodexp.form;
22

3+
import com.github.ilovegamecoding.intellijcodexp.services.CodeXPService;
4+
import com.intellij.openapi.application.ApplicationManager;
5+
36
import javax.swing.*;
47

58
public class CodeXPDashboard {
9+
private CodeXPService codeXPService = ApplicationManager.getApplication().getService(CodeXPService.class);
610
public JPanel pMain;
711
public JProgressBar pbCurrentLevelProgress;
812
public JLabel lblNextLabel;
913
public JLabel lblCurrentLevel;
1014
public JLabel tvCurrentLevelXP;
1115
public JTextField nicknameTextField;
12-
public JPanel clChallenges;
13-
public JPanel clCompletedChallenges;
1416
public JPanel lblCompletedChallenges;
1517
public JLabel lblTotalXP;
1618
public JLabel lblLevel;
1719
public JButton resetButton;
20+
public JPanel pEventStatistics;
21+
public JPanel pCompletedChallenges;
22+
public JPanel pChallenges;
23+
24+
public CodeXPDashboard() {
25+
resetButton.addActionListener(e -> {
26+
codeXPService.resetPlugin();
27+
});
28+
}
1829
}

0 commit comments

Comments
 (0)