aboutsummaryrefslogtreecommitdiff
path: root/Perl
diff options
context:
space:
mode:
Diffstat (limited to 'Perl')
-rw-r--r--Perl/demos/Tk/demos/zinc_lib/Zetris.pl11
1 files changed, 9 insertions, 2 deletions
diff --git a/Perl/demos/Tk/demos/zinc_lib/Zetris.pl b/Perl/demos/Tk/demos/zinc_lib/Zetris.pl
index 3a83bf7..592a93b 100644
--- a/Perl/demos/Tk/demos/zinc_lib/Zetris.pl
+++ b/Perl/demos/Tk/demos/zinc_lib/Zetris.pl
@@ -263,6 +263,7 @@ my $score_group = $tetris->add('group',1, -visible => 1);
my $new = $tetris->add('text',$score_group,
-text => " $lines Line\n",
#-anchor => 'e',
+ -font => $basefont->($fontheight),
-position => [$width-2,10],
);
@@ -345,7 +346,10 @@ sub resize_calc
}
}
if (!$fontheight) { $fontheight = $font_height[$#font_height] }
- $top->optionAdd("*font" => $basefont->($fontheight));
+ # the following line has been commented out since
+ # it modify default font for every application
+ # launched by zinc-demos! CM 26/3/02
+ # $top->optionAdd("*font" => $basefont->($fontheight));
}
sub make_key_bindings
@@ -390,6 +394,7 @@ sub inc_pause
$pause_w = $tetris->add('text',$pause_group,
-text => "PAUSE MODE :\n Type p to continue\n
\n\n\nHELP : \n\n- 'p' toggle pause\n\n- 'q' or 'F2' to quit game\n\n- Arrow keys to move blocks\n\n- 'n' to start a new game\n\n ",
+ -font => $basefont->($fontheight),
-position => [30,50],
-anchor => 'nw',
@@ -682,7 +687,7 @@ sub delete_line
# special effect on TkZinc logo
rotation($deuxpi*$angle/360);
$mylines++;
- $tetris->itemconfigure($new,-text => " $mylines Lines\n");
+ $tetris->itemconfigure($new,-text => " $mylines Lines\n", -font => $basefont->($fontheight));
}
sub rotation
@@ -744,6 +749,7 @@ sub game_over {
my $width = $top->width;
my $height = $top->height;
my $new = $tetris->add('text',$pause_group,
+ -font => $basefont->($fontheight),
-text => "You lost ! :o)\ntype 'n' to try again !",
-position => [20,100],
);
@@ -849,6 +855,7 @@ sub array_update
my $height = $top->height;
my $newlevel = $tetris->add('text',$pause_group,
-text => 'NEW LEVEL',
+ -font => $basefont->($fontheight),
-position => [20,20],
);
$top->update('idletasks');