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 problem

 
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: Sat Aug 26, 2006 1:11 am    Post subject: font problem Reply with quote

I use 0.16. I spent a full 2 hours without result. what's wrong with my code?
Code:
System.usbDiskModeActivate()
AlphaBlack = Color.new(0,0,0,125)
Green = Color.new(21,165,69)
ActFont = Font.createMonoSpaced()
ActFont:setPixelSizes(14, 14)
MenuScreen = Image.createEmpty(480,272)
MenuScreen:fontPrint(ActFont,100,100,"hello world",Green)
screen:blit(0,0,MenuScreen)
screen.flip()
while true do end


the result is:nada (nothing). just a black screen
[edit]
when I change it to this it works

Code:
System.usbDiskModeActivate()
AlphaBlack = Color.new(0,0,0,125)
Green = Color.new(21,165,69)
ActFont = Font.createMonoSpaced()
ActFont:setPixelSizes(14, 14)
MenuScreen = Image.createEmpty(480,272)
screen:fontPrint(ActFont,100,100,"hello world",Green)
--screen:blit(0,0,MenuScreen)
screen.flip()
while true do
if Controls.read():start() then break end
 end
seems that you must print it directly to screen. can anyone confirm this?
_________________
Behold! The Underminer got hold of a PSP
Back to top
View user's profile Send private message
kErov4



Joined: 30 Sep 2006
Posts: 3

PostPosted: Sun Oct 08, 2006 6:34 am    Post subject: Reply with quote

blit the MenuScreen BEFORE print "hello world"
Back to top
View user's profile Send private message
romero126



Joined: 24 Dec 2005
Posts: 200

PostPosted: Sun Oct 08, 2006 8:26 am    Post subject: Reply with quote

Fontprint should work on all images.
Back to top
View user's profile Send private message
kErov4



Joined: 30 Sep 2006
Posts: 3

PostPosted: Sun Oct 08, 2006 9:32 am    Post subject: Reply with quote

Of course; but he is hidding the text with the "background", so draw first MenuScreen, then write the text
Back to top
View user's profile Send private message
romero126



Joined: 24 Dec 2005
Posts: 200

PostPosted: Sun Oct 08, 2006 9:33 am    Post subject: Reply with quote

MenuScreen:fontPrint(ActFont,100,100,"hello world",Green)
screen:blit(0,0,MenuScreen)

Doesnt look like that to me!
Back to top
View user's profile Send private message
kErov4



Joined: 30 Sep 2006
Posts: 3

PostPosted: Sun Oct 08, 2006 9:51 am    Post subject: Reply with quote

Ok my noob mistake, i mixed the 1st and the 2nd code and don't saw the MenuScreen:fontPrint; thought it was screen:fontPrint too =/
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