Slick Forums

Discuss the Slick 2D Library
It is currently Wed May 22, 2013 3:45 am

All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Widgets not visible
PostPosted: Thu May 10, 2012 5:35 pm 
Offline
Slick Zombie

Joined: Fri Jan 29, 2010 7:02 pm
Posts: 1171
Paste the code then I can take a look. I assume you don't use TWLStateBasedGame? So it's likely that you are missing some important initializing steps.

_________________
TWL - The Themable Widget Library


Top
 Profile  
 
 Post subject: Re: Widgets not visible
PostPosted: Thu May 10, 2012 5:42 pm 
Offline
Regular

Joined: Sun Oct 25, 2009 5:24 pm
Posts: 118
I am using the code you're providing on your website via the zip file. Only difference is, that my BasicTWLState extends World, which extends BasicGameState.

TWLStateBasedGame --> http://pastie.org/private/apjs5ia31x2k0lanwevegw
BasicTWLGameState --> http://pastie.org/private/y9dsajgnqgxrxqsmkiaa
InputForwarder --> http://pastie.org/private/ee5jhnjcysupx8lcrrulq
RootPane --> http://pastie.org/private/3hymwp2akwoxngfwmpalw
My starting class --> http://pastie.org/private/veqxdki0u9nabqyntayrq
My Menu State --> http://pastie.org/private/bmidj7m1dleuigjbtbmzwq

Thanks for your effort, mate.


Top
 Profile  
 
 Post subject: Re: Widgets not visible
PostPosted: Thu May 10, 2012 6:47 pm 
Offline
Slick Zombie

Joined: Fri Jan 29, 2010 7:02 pm
Posts: 1171
Looks ok so far - maybe Slick has some FBO / render to texture active at the time the LWJGLRenderer is constructed which results in it querying the wrong view port size. You could try to directly set the view port size via LWJGLRenderer.setViewport(int,int,int,int);

_________________
TWL - The Themable Widget Library


Top
 Profile  
 
 Post subject: Re: Widgets not visible
PostPosted: Thu May 10, 2012 7:25 pm 
Offline
Regular

Joined: Sun Oct 25, 2009 5:24 pm
Posts: 118
THANK YOU!

The following lines fixed the problem:

Code:
LWJGLRenderer renderer = new LWJGLRenderer();
renderer.setViewport(0, 0, getContainer().getWidth(), getContainer().getHeight());


Top
 Profile  
 
 Post subject: Re: Widgets not visible
PostPosted: Thu May 10, 2012 8:08 pm 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1469
Sounds like it might be a bug with MarteEngine or Slick; i.e. not calling "flush" on Graphics. I'll look into it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


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