diff --git a/.classpath b/.classpath index 7e04485..0507f35 100644 --- a/.classpath +++ b/.classpath @@ -5,5 +5,7 @@ + + diff --git a/.gitignore b/.gitignore index 997ceee..03a74bf 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,8 @@ /update.png /WSplits /drag_bar.png +/jinput-dx8.dll +/jinput-dx8_64.dll +/jinput-raw.dll +/jinput-raw_64.dll +/jinput-wintab.dll diff --git a/lib/jinput-2.0.5.jar b/lib/jinput-2.0.5.jar new file mode 100644 index 0000000..2081334 Binary files /dev/null and b/lib/jinput-2.0.5.jar differ diff --git a/lib/jutils-1.0.0.jar b/lib/jutils-1.0.0.jar new file mode 100644 index 0000000..147b542 Binary files /dev/null and b/lib/jutils-1.0.0.jar differ diff --git a/projectBuilder.xml b/projectBuilder.xml index 601f13f..50a4f1b 100644 --- a/projectBuilder.xml +++ b/projectBuilder.xml @@ -15,6 +15,8 @@ + + diff --git a/sigIRCv2.bat b/sigIRCv2.bat index e763464..2a25311 100644 --- a/sigIRCv2.bat +++ b/sigIRCv2.bat @@ -1 +1 @@ -java -jar ./sigIRCv2.jar \ No newline at end of file +java -jar ./sigIRCv2.jar -Djava.library.path=lib/ \ No newline at end of file diff --git a/sigIRCv2.jar b/sigIRCv2.jar index 128d61f..4b2b2ea 100644 Binary files a/sigIRCv2.jar and b/sigIRCv2.jar differ diff --git a/src/sig/MyPanel.java b/src/sig/MyPanel.java index fe49d42..a53a464 100644 --- a/src/sig/MyPanel.java +++ b/src/sig/MyPanel.java @@ -161,7 +161,6 @@ public class MyPanel extends JPanel implements MouseListener, ActionListener, Mo @Override public void keyTyped(KeyEvent e) { - } @Override diff --git a/src/sig/modules/ControllerModule.java b/src/sig/modules/ControllerModule.java new file mode 100644 index 0000000..8cb32a4 --- /dev/null +++ b/src/sig/modules/ControllerModule.java @@ -0,0 +1,27 @@ +package sig.modules; + +import java.awt.Graphics; +import java.awt.geom.Rectangle2D; + +import net.java.games.input.Controller; +import net.java.games.input.ControllerEnvironment; +import sig.Module; + +public class ControllerModule extends Module{ + + public ControllerModule(Rectangle2D bounds, String moduleName) { + super(bounds, moduleName); + Controller[] ca = ControllerEnvironment.getDefaultEnvironment().getControllers(); + for (Controller c : ca) { + System.out.println(c.getName()); + } + } + + public void run() { + super.run(); + } + + public void draw(Graphics g) { + super.draw(g); + } +} diff --git a/src/sig/sigIRC.java b/src/sig/sigIRC.java index 94a0ab2..7e1733b 100644 --- a/src/sig/sigIRC.java +++ b/src/sig/sigIRC.java @@ -14,6 +14,7 @@ import com.mb3364.twitch.api.models.Channel; import com.mb3364.twitch.api.models.Stream; import sig.modules.ChatLogModule; +import sig.modules.ControllerModule; import sig.modules.TouhouMotherModule; import sig.modules.TwitchModule; import sig.modules.ChatLog.ChatLogMessage; @@ -116,6 +117,11 @@ public class sigIRC{ public static int chatlogmodule_X=0; public static int chatlogmodule_Y=312; public static int chatlogMessageHistory=50; + public static boolean controllermodule_enabled=true; + public static int controllermodule_width=320; + public static int controllermodule_height=312; + public static int controllermodule_X=0; + public static int controllermodule_Y=312; public static String twitchmodule_newfollowerImgBackgroundColor="90,90,90"; public static String twitchmodule_newfollowerShadowTextColor="26,90,150"; public static String twitchmodule_newfollowerTextColor="255,255,255"; @@ -183,6 +189,10 @@ public class sigIRC{ chatlogmodule_Y = config.getInteger("CHATLOG_module_Y",312); chatlogmodule_width = config.getInteger("CHATLOG_module_width",320); chatlogmodule_height = config.getInteger("CHATLOG_module_height",312); + controllermodule_X = config.getInteger("CONTROLLER_module_X",0); + controllermodule_Y = config.getInteger("CONTROLLER_module_Y",312); + controllermodule_width = config.getInteger("CONTROLLER_module_width",320); + controllermodule_height = config.getInteger("CONTROLLER_module_height",312); chatlogmodule_backgroundColor = config.getProperty("CHATLOG_module_BackgroundColor", "195,195,195,255"); chatlogMessageHistory = config.getInteger("CHATLOG_module_MessageHistory",50); hardwareAcceleration = config.getBoolean("hardware_acceleration",true); @@ -256,7 +266,11 @@ public class sigIRC{ manager = new FileManager("update.png"); manager.verifyAndFetchFileFromServer(); manager = new FileManager("backcolor.png"); manager.verifyAndFetchFileFromServer(); manager = new FileManager("drag_bar.png"); manager.verifyAndFetchFileFromServer(); - manager = new FileManager("WSplits"); manager.verifyAndFetchFileFromServer(); + manager = new FileManager("jinput-dx8.dll"); manager.verifyAndFetchFileFromServer(); + manager = new FileManager("jinput-dx8_64.dll"); manager.verifyAndFetchFileFromServer(); + manager = new FileManager("jinput-raw.dll"); manager.verifyAndFetchFileFromServer(); + manager = new FileManager("jinput-raw_64.dll"); manager.verifyAndFetchFileFromServer(); + manager = new FileManager("jinput-wintab.dll"); manager.verifyAndFetchFileFromServer(); DownloadProgramUpdate(); System.out.println("Downloaded Dependencies. "); } @@ -310,6 +324,12 @@ public class sigIRC{ "Chat Log" )); } + if (controllermodule_enabled) { + modules.add(new ControllerModule( + new Rectangle(controllermodule_X,controllermodule_Y,controllermodule_width,controllermodule_height), + "Controller" + )); + } } private static void InitializeCustomSounds() {