Say you have a book with hotspot over it and when the mouse moves over it you have txtx show something like "This is the book you need"
How would you do that ? or can you point me to the help file that shows how .
CreateTextOverlay (50,80,120,2,15,"This is a text overlay"); <-- think using this maybe ?
Try:
1) Create an int in the Room Script, called 'this'
// room script file
int this;
The name isn't important, of course, as long as you use the same one in the next bit.
2) Add this to the room's Repeatedly_Execute:
if ((GetHotspotAt (mouse.x, mouse.y) == 2) && (IsOverlayValid (this) == 0)) this = CreateTextOverlay (50,80,120,2,15,"This is the book you need.");
else if ((IsOverlayValid (this) == 1) && (GetHotspotAt (mouse.x, mouse.y) != 2)) RemoveOverlay (this);
Making sure that the Hotspot in the GetHotspotAt commands is the right one, and changing the CreateTextOverlay values (x, y, font, etc) to suit.
Of course, if you've got a statusline GUI already, there's probably a simpler way.
Works great , took me a sec to find what the hotspot was then seen the 2
if ((GetHotspotAt (mouse.x, mouse.y) == 2) that was the hotspot number right ? lol
Yup, and also one on the next line.
Cool so I just need to change the number to the next hotspot number for the next txt overlay . thanks
How can I change the size of the fonts ? besides installing a new smaller font .
I think you can't do that after import (size of SCI fonts can never be changed, TTF size can be set upon importing), you have to import another.
Ok Thanks for the info
Quote from: Candle on Wed 05/01/2005 07:35:38How can I change the size of the fonts ? besides installing a new smaller font.
BFAQ'ed: http://bfaq.terran-x.com/#graphics31 Good question.