Slick Forums

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

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Tool Tip Questions
PostPosted: Wed Jun 13, 2012 4:44 pm 
Offline
Oldbie

Joined: Thu Mar 15, 2012 12:38 am
Posts: 260
Hello,

I am now playing around with tool tips. I have a few questions:

1. Is it possible to make it so the tool tip widget moves as the mouse cursor moves on the widget?
2. Is it possible to make it so the tool tip widget will position itself correctly if it happens to be drawn offscreen?
3. Is it possible to have the contents of the tool tip change based on dynamic data? For example, maybe I have a Label with "Attack Rating: 354" and I want to have a tool tip that displays the break down of the number of 354? Then maybe the player equips a new weapon that changes the Attack Rating to something else - so the contents of the Tool Tip would change.
4. Is it possible to have tool tips for list entries in a List Widget? Maybe I have a list of of certain objects and I want to display each differently based on what they are as the user mouses over them. For example, maybe I have a list with two items in it. The first item is a NPC and the second item is Item and each can be displayed differently?

Thanks.


Top
 Profile  
 
 Post subject: Re: Tool Tip Questions
PostPosted: Wed Jun 13, 2012 10:16 pm 
Offline
Slick Zombie

Joined: Fri Jan 29, 2010 7:02 pm
Posts: 1171
1) currently not
2) that should already be the case
3a) sure - you can put a TextArea as the tooltip content - in that case the displayed text is supplied by a TextAreaModel
3b) change the tooltip content when the data changes - eg setTooltipContent()
4a) ListModel has a getEntryTooltip() method which you can override to provide tooltips for items in a ListBox or ComboBox
4b) TabelModel has a getTooltipContent() method which you can override to provide tooltips for table cells

_________________
TWL - The Themable Widget Library


Top
 Profile  
 
 Post subject: Re: Tool Tip Questions
PostPosted: Wed Jun 13, 2012 11:26 pm 
Offline
Oldbie

Joined: Thu Mar 15, 2012 12:38 am
Posts: 260
Thanks for your reply! It was very helpful (as usual).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 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