-bg => $option{-background} || $option{-bg};
for (qw/ normal bold italic underline / ) {
if ($option{"-$_"}) {
- &{"SDL::TTFont::$_"}($$self{-font});
+
+ SDL::TTFont->can($_)->($$self{-font});
+ #&{$sub}($$self{-font});
}
}
} else {
sub print {
my ($self,$surface,$x,$y,@text) = @_;
croak "Tool::Font::print requires a SDL::Surface\n"
- unless ($SDL::DEBUG && $surface->isa('SDL::Surface'));
+ unless ($surface->isa('SDL::Surface'));
if ($$self{-font}->isa('SDL::Font')) {
$$self{-font}->use();
SDL::SFont::PutString( $$surface, $x, $y, join('',@text));