Slick Forums

Discuss the Slick 2D Library
It is currently Thu Jun 20, 2013 8:08 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: misc updates
PostPosted: Tue Nov 04, 2008 10:12 am 
Offline
Game Developer
User avatar

Joined: Sun May 25, 2008 9:45 am
Posts: 578
Hey Kev! I haven't posted a patch in a while, so unfortunately this patch will have many separate changes in it, some of which are somewhat sucky:

http://n4te.com/temp/thingle-misc.patch

* Added Widget#setRenderer so I can set a renderer programmatically. Had to make Thinlet#set(Object component, Object key, Object value) public to do this.

* Added getTranslationX/Y to ThingleGraphics. This allows me to get the screen position of the widget in my WidgetRenderer. In my case, I use this along with the Rectangle given to WidgetRenderer#paint so I can know if the mouse is over my widget. I'd be happy to implement this whatever way is cleaner.

* In Thinlet (really, what isn't in Thinlet...) when a component is added to another, a dirty flag is set, next time paint is called, the whole page is laid out. This seems to be for convenience only, reducing manual calls to layout. What happens to me is I have a file chooser dialog and if you resize the dialog to be larger, then change the current directory, a bunch of new choices are added to a combobox, triggering a layout of the whole page. This sizes the dialog back to its original size and centers it on the screen.

Apparently sizing the dialog with the mouse doesn't "stick". I looked into why and it was a painful experience wrought with pitfalls. In the end I just commented out the automatic layout and added 2-3 layout() calls in throughout my code.

* Fixed a division by zero problem. This would happen in ThingEditor as a slider was typed.

* I commented out some code in Thinlet at about line 4505. I can't say I really understand this piece of code. I can say that if I don't comment this out, then if I open a modal dialog, the dialog cannot receive input but the GUI under the dialog still can.

* Added Eclipse project files.

These are all my changes from SVN. I am happy to solve any of the problems differently.

_________________
SingSong Karaoke - http://singthegame.com


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 11, 2008 10:04 am 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
I'll try and get these in tonights session.

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 11, 2008 8:49 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
In SVN.

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 11, 2008 11:55 pm 
Offline
Game Developer
User avatar

Joined: Sun May 25, 2008 9:45 am
Posts: 578
Thanks Kev. Verified good.

_________________
SingSong Karaoke - http://singthegame.com


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 0 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