Skip to content

Commit

Permalink
Removed option to kick player on same click when response message is …
Browse files Browse the repository at this point in the history
…sended (it was 2 server actions per 1 player action)
  • Loading branch information
Morph21 committed Feb 2, 2021
1 parent 5492495 commit de897c2
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.mercury.platform.core;

public class MercuryConstants {
public static final String APP_VERSION = "1.1.6";
public static final String APP_VERSION = "1.1.7";
public static final String SERVER_HOST = "exslims.ddns.net";
public static final int PORT = 5555;
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,18 @@ public void mouseExited(MouseEvent e) {
});
button.addActionListener(e -> {
this.controller.performResponse(buttonConfig.getResponseText());
if (buttonConfig.isKickLeave()) {
waitForNextAction();
if (out) {
String playerNickname = this.notificationConfig.get().getPlayerNickname();
if (StringUtils.isNotEmpty(playerNickname)) {
this.controller.performKickLeave(playerNickname);
}
} else {
this.controller.performKickLeave(nicknameLabel.getText());

}
}
// if (buttonConfig.isKickLeave()) {
// waitForNextAction();
// if (out) {
// String playerNickname = this.notificationConfig.get().getPlayerNickname();
// if (StringUtils.isNotEmpty(playerNickname)) {
// this.controller.performKickLeave(playerNickname);
// }
// } else {
// this.controller.performKickLeave(nicknameLabel.getText());
//
// }
// }
if (buttonConfig.isClose()) {
this.controller.performHide();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ public void onViewInit() {
headerPanel.add(titleLabel, BorderLayout.LINE_START);
headerPanel.add(valueLabel, BorderLayout.CENTER);

JPanel actionsPanel = this.componentsFactory.getJPanel(new BorderLayout(7,7), AppThemeColor.SETTINGS_BG);
actionsPanel.add(this.componentsFactory.getIconLabel(IconConst.CLOSE, 15), BorderLayout.LINE_START);
actionsPanel.add(this.componentsFactory.getIconLabel(IconConst.KICK, 15), BorderLayout.LINE_END);
JPanel actionsPanel = this.componentsFactory.getJPanel(new BorderLayout(10,10), AppThemeColor.SETTINGS_BG);
actionsPanel.add(this.componentsFactory.getIconLabel(IconConst.CLOSE, 15), BorderLayout.CENTER);
// actionsPanel.add(this.componentsFactory.getIconLabel(IconConst.KICK, 15), BorderLayout.LINE_END);

JPanel miscPanel = this.componentsFactory.getJPanel(new BorderLayout(4,4), AppThemeColor.SETTINGS_BG);
miscPanel.add(actionsPanel, BorderLayout.LINE_START);
Expand Down Expand Up @@ -114,11 +114,11 @@ public void focusLost(FocusEvent e) {
checkboxPanel.add(checkBoxClose, BorderLayout.LINE_START);


JCheckBox checkBoxKick = this.componentsFactory.getCheckBox(descriptor.isKickLeave(), "Kick/Leave after click?");
checkBoxKick.addActionListener(action -> {
descriptor.setKickLeave(checkBoxKick.isSelected());
});
checkboxPanel.add(checkBoxKick, BorderLayout.LINE_END);
// JCheckBox checkBoxKick = this.componentsFactory.getCheckBox(descriptor.isKickLeave(), "Kick/Leave after click?");
// checkBoxKick.addActionListener(action -> {
// descriptor.setKickLeave(checkBoxKick.isSelected());
// });
// checkboxPanel.add(checkBoxKick, BorderLayout.LINE_END);

miscPanel.add(checkboxPanel, BorderLayout.LINE_START);

Expand Down
10 changes: 9 additions & 1 deletion app-ui/src/main/resources/notes/patch/patch-notes-new.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
[
{
"version": "1.1.7",
"fix": [
{
"changed": "Removed option to kick player on same click when response message is sended (it was 2 server actions per 1 player action)"
}
]
},
{
"version": "1.1.6",
"features": [
Expand All @@ -11,7 +19,7 @@
"changed": "Fixed persistent tooltips error"
},
{
"changed": "Fixed notifications not showing in specific circumstances (works only for downward direction of notifications"
"changed": "Fixed notifications not showing in specific circumstances (works only for downward direction of notifications)"
}
]
},
Expand Down
8 changes: 4 additions & 4 deletions release_files/release_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
<runtimeBits>64/32</runtimeBits>
</jre>
<versionInfo>
<fileVersion>1.1.5.0</fileVersion>
<txtFileVersion>1.1.5</txtFileVersion>
<fileVersion>1.1.7.0</fileVersion>
<txtFileVersion>1.1.7</txtFileVersion>
<fileDescription>MercuryTrade</fileDescription>
<copyright>Morph21</copyright>
<productVersion>1.1.5.0</productVersion>
<txtProductVersion>1.1.5</txtProductVersion>
<productVersion>1.1.7.0</productVersion>
<txtProductVersion>1.1.7</txtProductVersion>
<productName>MercuryTrade</productName>
<companyName>Morph</companyName>
<internalName>MercuryTrade</internalName>
Expand Down

0 comments on commit de897c2

Please sign in to comment.