| View previous topic :: View next topic |
| Author |
Message |
the underminer
Joined: 03 Oct 2005 Posts: 124 Location: Netherlands
|
Posted: Mon Feb 12, 2007 7:22 pm Post subject: Font:getTextSize : howto? |
|
|
It seems to return a table. I thought this would be a table with two values: x an y size. But when I do this:
| Code: | | print(ActFont:getTextSize(BonusTXT[LastB+1])[1]) |
the result is nil. When I try this:
| Code: | | print(ActFont:getTextSize(BonusTXT[LastB+1])[width]) |
the result is nil too. Who knows how to get the width or x-size from this function? _________________ Behold! The Underminer got hold of a PSP |
|
| Back to top |
|
 |
the underminer
Joined: 03 Oct 2005 Posts: 124 Location: Netherlands
|
Posted: Mon Feb 12, 2007 11:41 pm Post subject: |
|
|
I already found out myself: I forgot the quotation marks. Should be | Code: | | ActFont:getTextSize(BonusTXT[LastB+1])["width"] |
for the height, you probably need ["height"] _________________ Behold! The Underminer got hold of a PSP |
|
| Back to top |
|
 |
|