forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Font:getTextSize : howto?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
the underminer



Joined: 03 Oct 2005
Posts: 124
Location: Netherlands

PostPosted: Mon Feb 12, 2007 7:22 pm    Post subject: Font:getTextSize : howto? Reply with quote

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
View user's profile Send private message
the underminer



Joined: 03 Oct 2005
Posts: 124
Location: Netherlands

PostPosted: Mon Feb 12, 2007 11:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group