mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2024-11-22 15:38:05 -05:00
Click buttons without delay
This commit is contained in:
parent
3bb37e3f0e
commit
3100ef4ce8
2 changed files with 4 additions and 4 deletions
|
@ -197,7 +197,7 @@ public class GeneralTab extends UITab {
|
||||||
timer.stop();
|
timer.stop();
|
||||||
|
|
||||||
if (System.getProperty("viaproxy.gui.autoStart") != null) {
|
if (System.getProperty("viaproxy.gui.autoStart") != null) {
|
||||||
this.stateButton.doClick();
|
this.stateButton.doClick(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -237,7 +237,7 @@ public class RealmsTab extends UITab {
|
||||||
final int chosen = JOptionPane.showConfirmDialog(this.viaProxyWindow, I18n.get("tab.realms.accept_tos", "https://aka.ms/MinecraftRealmsTerms"), "ViaProxy", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
|
final int chosen = JOptionPane.showConfirmDialog(this.viaProxyWindow, I18n.get("tab.realms.accept_tos", "https://aka.ms/MinecraftRealmsTerms"), "ViaProxy", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
|
||||||
if (chosen == JOptionPane.YES_OPTION) {
|
if (chosen == JOptionPane.YES_OPTION) {
|
||||||
javaRealmsService.acceptTos();
|
javaRealmsService.acceptTos();
|
||||||
join.doClick();
|
join.doClick(0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Logger.LOGGER.error("Failed to join realm", cause);
|
Logger.LOGGER.error("Failed to join realm", cause);
|
||||||
|
@ -256,12 +256,12 @@ public class RealmsTab extends UITab {
|
||||||
final GeneralTab generalTab = this.viaProxyWindow.generalTab;
|
final GeneralTab generalTab = this.viaProxyWindow.generalTab;
|
||||||
if (generalTab.stateButton.isEnabled()) {
|
if (generalTab.stateButton.isEnabled()) {
|
||||||
if (!generalTab.stateButton.getText().equals(I18n.get("tab.general.state.start"))) {
|
if (!generalTab.stateButton.getText().equals(I18n.get("tab.general.state.start"))) {
|
||||||
generalTab.stateButton.doClick(); // Stop the running proxy
|
generalTab.stateButton.doClick(0); // Stop the running proxy
|
||||||
}
|
}
|
||||||
generalTab.serverAddress.setText(address);
|
generalTab.serverAddress.setText(address);
|
||||||
generalTab.serverVersion.setSelectedItem(version);
|
generalTab.serverVersion.setSelectedItem(version);
|
||||||
generalTab.authMethod.setSelectedIndex(0);
|
generalTab.authMethod.setSelectedIndex(0);
|
||||||
generalTab.stateButton.doClick();
|
generalTab.stateButton.doClick(0);
|
||||||
this.viaProxyWindow.contentPane.setSelectedIndex(0);
|
this.viaProxyWindow.contentPane.setSelectedIndex(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue