 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
the underminer
Joined: 03 Oct 2005 Posts: 124 Location: Netherlands
|
Posted: Sat Aug 26, 2006 1:11 am Post subject: font problem |
|
|
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 |
|
 |
kErov4
Joined: 30 Sep 2006 Posts: 3
|
Posted: Sun Oct 08, 2006 6:34 am Post subject: |
|
|
| blit the MenuScreen BEFORE print "hello world" |
|
| Back to top |
|
 |
romero126
Joined: 24 Dec 2005 Posts: 200
|
Posted: Sun Oct 08, 2006 8:26 am Post subject: |
|
|
| Fontprint should work on all images. |
|
| Back to top |
|
 |
kErov4
Joined: 30 Sep 2006 Posts: 3
|
Posted: Sun Oct 08, 2006 9:32 am Post subject: |
|
|
| Of course; but he is hidding the text with the "background", so draw first MenuScreen, then write the text |
|
| Back to top |
|
 |
romero126
Joined: 24 Dec 2005 Posts: 200
|
Posted: Sun Oct 08, 2006 9:33 am Post subject: |
|
|
MenuScreen:fontPrint(ActFont,100,100,"hello world",Green)
screen:blit(0,0,MenuScreen)
Doesnt look like that to me! |
|
| Back to top |
|
 |
kErov4
Joined: 30 Sep 2006 Posts: 3
|
Posted: Sun Oct 08, 2006 9:51 am Post subject: |
|
|
| 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 |
|
 |
|
|
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
|