Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11855 Posts in 1569 Topics- by 3058 Members - Latest Member: xynewhand

12. February 2012, 02:43:52 AM
Xith3D CommunityGeneral CategoryNews (Moderators: Marvin Fröhlich, 'n ddrylliog)HUD ToolTips
Pages: [1]
Print
Author Topic: HUD ToolTips  (Read 1496 times)
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« on: 07. May 2008, 12:22:12 AM »

I have added support for ToolTips for the HUD.

All you need to do to use them is to start the MouseStopManager like this:
Code:
InputSystem.getInstance().getMouse().startMouseStopManager();
Since this starts a separate Thread, this is not enabled by default.

You can simply set the ToolTip for a Widget by doing:
Code:
myWidget.setToolTip( "blah" );

The ToolTips are created through a ToolTipFactory, which is attached to the HUD instance. See the setToolTipFactory() method. By default the HUD keeps an instance of DefaultToolTipFactory, which creates Labels with light-yellow background and a sunken-bevel-border.

If you want ToolTips with a different look-and-feel, you just have to create you own ToolTipFactory implementation and attach it to the HUD.

Marvin
Logged
Mancer
Enjoying the stay
*
Offline Offline

Posts: 68


View Profile
« Reply #1 on: 07. May 2008, 11:34:14 AM »

Wow ! What a quick reaction ! Shocked

Many thanks for that!
I'll use it right now  Cool
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic