123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|113|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> MouseOver Rectangle with Fontgrab

Sat, 17 May 2008, 05:49
LostUser
I'm currently using the Fontgrab library to create some fonts for my game.

In the menu's, I'd like it to have a rectangle appearing behind the text; a rollover mouse effect on the menu of choice.

Now, I've got it working. But the problem is, that the rectangles are not the same width. There is a lot of white space at the end of the menu option.

How do I make the rectangles the same width?

I know I could specifiy a fixed width, but the problem is that the width might not be big enough.




Uses the Fontgrab library as seen on the following URL;
https://socoder.net/index.php?topic=1075&viewpost=13689#13689

Uses the following mouseover routine;



Sat, 17 May 2008, 06:00
Jayenkai


This'll let you know the width of the string you're working with, and will calculate it based on the width of each character individually.

-=-=-
''Load, Next List!''
Sat, 17 May 2008, 07:45
LostUser
Fantastic!