Slick Forums

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

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: TWL FAQ
PostPosted: Sat May 15, 2010 8:12 pm 
Offline
Game Developer
User avatar

Joined: Wed Feb 17, 2010 12:24 am
Posts: 598
Feel free to post any FAQs, I'll try to consolidate them nicely into this thread.

Q: Cursor only paints half in Eforen theme
Answer wrote:


Q: Can you display an image not in the theme file
Answer wrote:


Q: I get a 'null URL' exception when trying to load theme.
Answer wrote:
The theme directory needs to be in classpath.
MatthiasM wrote:
I also found out why ClassLoader.getResource() does not work for you: your "res" folder is not part of the classpath. When you add it then you can also access it via the classpath :)

More info here: http://slick.javaunlimited.net/viewtopic.php?t=2450

More
MatthiasM wrote:
a) File.toURL() is deprecated - any IDE should show this
b) if you put your resources on the classpath you should use MyClass.class.getResource("<relative-path>"); as done in the examples.
c) Using File to access resources will not work in applets or webstart.


Q: I get an error saying child or widget is already in tree
Answer wrote:
This happens if you initialize/setup TWL more than once. If you call the TWL setup code in a Slick gamestate init(), it can and will be called more than once. Something like this will work:
Code:
if (root != null) { return; } // root has already been initialized
else { // else, setup TWL here. }


Q:What is the minimum OpenGL requirements for TWL to work?
Answer wrote:
MatthiasM wrote:
The provided renderer requires OpenGL 1.2


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

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