Slick Forums

Discuss the Slick 2D Library
It is currently Sat Dec 16, 2017 2:41 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu May 03, 2012 2:17 pm 
Offline

Joined: Sun Apr 29, 2012 10:38 am
Posts: 13
I wanted to add this information to the wiki, but there is no "edit" (or I missed it):
http://wiki.l33tlabs.org/bin/view/TWL/

Requirements:

1) Download TWL http://twl.l33tlabs.org/demo/twl.zip & extract
2) In Eclipse import 2 existing project into workspace:
a) the twl/TWL directory
b) the twl/TWLEXAMPLES directory
3) for each project: properties->java build path->TAB:Libraries
add external jars:
    - lwjgl.jar
    IMPORTANT: the click the arrow next to lwjgl.jar and click on "Native Library Location" and click "edit" select the proper subdirectory in the lwjgl directory (should be under native and your Operating System)
    - TWLEffects.jar
    - xpp3-1.1.4c.jar
4) set to JDK 1.5 (I don't know if this is really necessary): for each project: properties->Java Compiler:
enable project specific settings: CHECK
select JDK version 1.5.
5) now all errors should be gone, if so then test by running one of the tests in TWLExamples.

Everything worked? Yes, good :)
Now, if you close the twl project you will get an error. The simple solution is below:

6) The TWL Examples project requires the TWL project be open at the same time. In order to get rid of this problem open (in TWL Examples) properties->java build path->TAB:projects and remove "twl" there. Then go properties->java build path->TAB:Libraries and add external jars: TWL.jar


if someone with an account would please add this to the wikipage, I would be happy :)
thx


Top
 Profile  
 
PostPosted: Thu May 03, 2012 4:08 pm 
Offline
Slick Zombie

Joined: Fri Jan 29, 2010 7:02 pm
Posts: 1242
Register an account on the wiki and send me the details via PM.

_________________
TWL - The Themable Widget Library


Top
 Profile  
 
PostPosted: Thu May 03, 2012 4:41 pm 
Offline

Joined: Sun Apr 29, 2012 10:38 am
Posts: 13
MatthiasM wrote:
Register an account on the wiki and send me the details via PM.

? I don't get that, when I make an account, why should I send you the details via PM????
especially since I don't want to create an another freaking account on another freaking
website...


Top
 Profile  
 
PostPosted: Fri Sep 27, 2013 8:08 pm 
Offline

Joined: Fri Sep 27, 2013 7:46 pm
Posts: 7
Hi !

First, thank you for this great library, as Slick 2D is.

Then, i just registered to complete that post (known by Google), especially for recent Eclipse.
Include libs as gladius said (java build path is doing the job)
For my project, i created a res folder and a themes\MyTheme hierarchy in this folder.
It's working except the application will never launch due to the getThemeURL() method and these well known issues " url is null ".

My solution
- Open Run Configurations (Run > Run Configurations...) (you can do it with Debug one)
- Go to Classpath tab of this configuration
- Click "User Entries" and "Advanced..."
- Select "Add Folders", click "OK", select your "res" folder (understand your resource folder, you can choose root one) and validate.

Now you can use this source as theme file path:
Code:
   @Override
   protected URL getThemeURL() {
      return TDEditor.class.getResource("/themes/MyTheme/theme.xml");
   }

The first "/" is very important, it's pointing on the resource folder and it's independent of your class file location (i did not find any solution relative to this folder).

Finally, off topic, this forum is really weird... before login, it was using a very old theme and now... a recent one.
I just think this forum need some maintenance. :D (As the TWL website... hey guys, it's the Themable Widget Lib !)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group