-
Notifications
You must be signed in to change notification settings - Fork 47
Home
SquidLib is compiled to Java 7 but limits itself to the subset of Java 7 features available on Android. The current master revision here on GitHub is compatible with Android (including squidlib-util, which can be used with any display method you like, and squidlib, which in the master revision depends on libGDX and will run on android), but stable release 2.9.1 is not. 3.0.0b1 may be partially compatible with Android, and at least the squidlib-util module should be. Any releases after 2.9.1 are split up into modules, with the squidlib-util module compatible with Android and Java 7 or higher. In release 3.0.0b1, Swing display is supported but discouraged in the squidlib module, and the squidlib-gdx module is preferred. In any release after 3.0.0b1, Swing code has been fully removed, and the squidlib module refers to what was squidlib-gdx (leaving two modules, squidlib for display using libGDX and squidlib-util for logic).
All samples linked on this page are compatible with Java 7. They're probably very out-of-date in regards to the current API, since these were written before SquidLib 2.0.0 and now the version is approaching 3.0.0, with breaking changes in both major version number increases. Going from 2.9.1 to the master revision (or 3.0.0 when it comes out) will entail many small breaking changes, the most common of which can be nearly-automatic search-and-replace-all changes.
You should prefer looking at the more involved samples in the repository, going to the "tag" corresponding to the version of SquidLib you are using. For 2.9.1, there are two samples here that go through most features in the library, particularly EverythingDemo. The launchers for those classes are in the desktop sub-folder, and if you use Maven or Gradle to build (there's a Maven pom.xml project provided), it should download any dependencies automatically.
Simple Example shows very basic initialization in Java and Scala.
SquidBridges uses slightly more complex interactions with the panel and also features mouse interaction. The mouse interaction is not yet part of the library itself, but rather coded into the SquidBridges class.