Slick Forums

Discuss the Slick 2D Library
It is currently Tue May 21, 2013 5:01 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Jan 16, 2012 7:49 pm 
Offline

Joined: Thu Jun 30, 2011 2:45 pm
Posts: 8
Hi! Any chance for a small change to ComboBoxBase? The button in there is created as final in the constructor (line 50), so I can't currently replace it with my own Button subclass (which uses some GLSL magic for game-specific rendering).

Could you please move the creation of that button instance to an overloadable method like the createColumnHeader method in TableBase? All other buttons (that I encountered so far) could easily be replaced, except for this one.

_________________
Solar War - A turn-based space strategy game using TWL


Top
 Profile  
 
PostPosted: Tue Jan 17, 2012 12:10 am 
Offline
Slick Zombie

Joined: Fri Jan 29, 2010 7:02 pm
Posts: 1171
Not easily - as the button is constructed in the constructor you can't easily call an virtual method as the constructor of the subclass has not yet run. Eg any fields of your subclass would be uninitialized at this point.

But if you only want to adjust the rendering you could just install a custom background/overlay Image which does the GLSL based rendering you want (make sure to set the button theme to "" so that your image is not replaced by one from the theme).

_________________
TWL - The Themable Widget Library


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] 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