Slick Forums

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

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Sun Sep 18, 2011 6:29 pm 
Offline

Joined: Wed Aug 17, 2011 2:25 pm
Posts: 30
Ok, so I'll just do a new topic explaining the whole deal.

What I am after is a tooltip with custom content (not just a string). When I hover an item I want to show alot of stuff in a tooltip.
I was wondering if there's some native way to do it in TWL maybe using the "tooltip" thing already in place.

Or else, maybe I can use eventhandler to see when a widget has mouseOver?

To give some idea of what I am after here's an image showing an item tooltip in the game World of Warcraft.

Image

_________________
I have a page where I'll put my stuff
Visit my luzsite.net!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 18, 2011 9:58 pm 
Offline
Slick Zombie

Joined: Fri Jan 29, 2010 7:02 pm
Posts: 1171
Just put a TextArea as tooltip content - but don't add it somewhere.

_________________
TWL - The Themable Widget Library


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 19, 2011 9:21 am 
Offline

Joined: Wed Aug 17, 2011 2:25 pm
Posts: 30
So I do not have to have XML done in some specific way?

Can I just make a Widget / TextArea whatever and add as tooltipcontent?

Example would be (psuedocoding) :
Code:
Button b = new Button();
b.setTheme("button");

TextArea t = new TextArea();
t.setTheme("textarea");

b.setTooltipContent(t);


And that's all? Or do the "button" theme need specific styling somehow?
Do I need to set position/size etc on the tooltip (TextArea) ?

_________________
I have a page where I'll put my stuff
Visit my luzsite.net!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 19, 2011 3:51 pm 
Offline

Joined: Wed Aug 17, 2011 2:25 pm
Posts: 30
Oh, I found my error.. I forgot to update the inputmanager lol
sorry

But I would like to know how I set a custom delay-time for a tooltip

_________________
I have a page where I'll put my stuff
Visit my luzsite.net!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 19, 2011 4:59 pm 
Offline
Slick Zombie

Joined: Fri Jan 29, 2010 7:02 pm
Posts: 1171
What is this "inputmanager" ?

And take a look at the GUI class - it has several setTooltip* methods.

_________________
TWL - The Themable Widget Library


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 19, 2011 5:46 pm 
Offline

Joined: Wed Aug 17, 2011 2:25 pm
Posts: 30
I did an inputmanager from one of the examples, or "inputadapter" I see it's called, sorry.
Like : "public class TWLInputAdapter extends InputAdapter"

I forgot to call its update(); in my main update(). I am curious how anything worked like that but oh well? I added it and it fixed tooltip issue.

I will look at GUI class then, I thought you could set tooltip options on each widget individually, so that was where I was looking.

_________________
I have a page where I'll put my stuff
Visit my luzsite.net!


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