Formatting code, removed TODO and imports.

This commit is contained in:
Maschell 2017-03-27 20:40:44 +02:00
parent e7fc629bec
commit 72fd042a3a
3 changed files with 13 additions and 20 deletions

View File

@ -80,8 +80,7 @@ public class GuiInputControls extends JPanel implements ActionListener {
statusLabel = new JLabel("Ready."); statusLabel = new JLabel("Ready.");
statusLabel.setAlignmentX(Component.CENTER_ALIGNMENT); statusLabel.setAlignmentX(Component.CENTER_ALIGNMENT);
cbautoActivateController = new JCheckBox();
cbautoActivateController = new JCheckBox();
cbautoActivateController.setSelected(Settings.AUTO_ACTIVATE_CONTROLLER); cbautoActivateController.setSelected(Settings.AUTO_ACTIVATE_CONTROLLER);
cbautoActivateController.addActionListener(new ActionListener() { cbautoActivateController.addActionListener(new ActionListener() {

View File

@ -117,7 +117,7 @@ public class ControllerManager {
break; break;
} }
if (c != null) { // I don't like that starting the Thread happens here =/ if (c != null) { // I don't like that starting the Thread happens here =/
if(Settings.AUTO_ACTIVATE_CONTROLLER){ if (Settings.AUTO_ACTIVATE_CONTROLLER) {
c.setActive(true); c.setActive(true);
} }
new Thread(c).start(); new Thread(c).start();

View File

@ -26,17 +26,11 @@ import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties; import java.util.Properties;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import lombok.extern.java.Log; import lombok.extern.java.Log;
import net.ash.HIDToVPADNetworkClient.controller.Controller.ControllerType;
import net.ash.HIDToVPADNetworkClient.util.Settings.Platform;
//TODO autosave IP addr
@Log @Log
public class Settings { public class Settings {
@ -92,10 +86,10 @@ public class Settings {
Settings.ipAddr = prop.getProperty("ipAddr"); Settings.ipAddr = prop.getProperty("ipAddr");
String autoActivatingControllerString = prop.getProperty("autoActivatingController"); String autoActivatingControllerString = prop.getProperty("autoActivatingController");
if(autoActivatingControllerString != null){ //We don't combine the if statements to keep the default value. if (autoActivatingControllerString != null) { // We don't combine the if statements to keep the default value.
if(autoActivatingControllerString.equals("true")){ if (autoActivatingControllerString.equals("true")) {
Settings.AUTO_ACTIVATE_CONTROLLER = true; Settings.AUTO_ACTIVATE_CONTROLLER = true;
}else{ } else {
Settings.AUTO_ACTIVATE_CONTROLLER = false; Settings.AUTO_ACTIVATE_CONTROLLER = false;
} }
} }