05-17-2014, 06:04 AM
I try to add a ButtonGroup to enable/disable ProOnline and enable/disable the client/server port shifts
code file
code.zip (Size: 62.4 KB / Downloads: 174)
code SettingsGUI.java
code MainGUI.java
code file
code.zip (Size: 62.4 KB / Downloads: 174)
code SettingsGUI.java
Code:
setStringFromSettings(metaServerTextField, "network.ProOnline.metaServer");
setStringFromSettings(broadcastAddressTextField,"network.broadcastAddress");
setBoolFromSettings(lanMultiPlayerRadioButton, "emu.lanMultiPlayer");
setBoolFromSettings(netServerPortShiftRadioButton, "emu.netServerPortShift");
setBoolFromSettings(netClientPortShiftRadioButton, "emu.netClientPortShift");
setBoolFromSettings(enableProOnlineRadioButton, "emu.enableProOnline");
setStringToSettings(metaServerTextField, "network.ProOnline.metaServer");
setStringToSettings(broadcastAddressTextField,"network.broadcastAddress");
setBoolToSettings(lanMultiPlayerRadioButton, "emu.lanMultiPlayer");
setBoolToSettings(netServerPortShiftRadioButton, "emu.netServerPortShift");
setBoolToSettings(netClientPortShiftRadioButton, "emu.netClientPortShift");
setBoolToSettings(enableProOnlineRadioButton, "emu.enableProOnline");
Code:
private void processArgs(String[] args) {
if (Settings.getInstance().readBool("emu.enableProOnline")) {
ProOnlineNetworkAdapter.setEnabled(true);
}else if (Settings.getInstance().readBool("emu.netServerPortShift")) {
Modules.sceNetAdhocModule.setNetServerPortShift(100);
}else if (Settings.getInstance().readBool("emu.netClientPortShift")) {
Modules.sceNetAdhocModule.setNetClientPortShift(100);
}else