use SDL::TTFont #94

Closed
kthakore opened this Issue Jul 26, 2011 · 3 comments

Projects

None yet

1 participant

@kthakore
PerlGameDev member

if I try to use SDL::TTFont...

Use of inherited AUTOLOAD for non-method SDL::TTFInit() is deprecated at C:/stra
wberry/perl/site/lib/SDL/TTFont.pm line 178.
Can't locate auto/SDL/TTFInit.al in @INC (@INC contains: lib C:/strawberry/perl/
lib C:/strawberry/perl/site/lib C:\strawberry\perl\vendor\lib .) at C:/strawberr
y/perl/site/lib/SDL/TTFont.pm line 178
Compilation failed in require at lib/SDL/Tutorial/Tetris/View.pm line 14.
BEGIN failed--compilation aborted at lib/SDL/Tutorial/Tetris/View.pm line 14.
Compilation failed in require at lib/SDL/Tutorial/Tetris.pm line 4.
BEGIN failed--compilation aborted at lib/SDL/Tutorial/Tetris.pm line 4.
Compilation failed in require at Tetris.pl line 7.
BEGIN failed--compilation aborted at Tetris.pl line 7.
shell returned 2
Hit any key to close this window...

@kthakore
PerlGameDev member

Author: FROGGS
Time: 1268390468
Field: status
Value: closed

@kthakore kthakore was assigned Jul 26, 2011
@kthakore
PerlGameDev member

Author: FROGGS
Time: 1268390468
Field: resolution
Value: fixed

@kthakore
PerlGameDev member

Author: FROGGS
Time: 1268390468
Field: comment
Value: SDL::TTF is implemented now:

use SDL::Surface; # and SDL::Video, maybe SDL::Rect, SDL::Color, ...
use SDL::TTF;
use SDL::TTF_Font;

SDL::TTF::init();
my $font = SDL::TTF::open_font('my_font_file.ttf', 8); # 8 is fontsize
my $surface = SDL::TTF::render_text_blended($font, 'Your text goes here.', SDL::Color->new(0xFF,0xFF,0xFF));

Init video here, blit this surface to your video-surface und update it

SDL::TTF::quit();

@kthakore kthakore closed this Jul 26, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment