aboutsummaryrefslogtreecommitdiff
path: root/Perl/demos/Tk
diff options
context:
space:
mode:
authormertz2002-03-26 13:53:02 +0000
committermertz2002-03-26 13:53:02 +0000
commit70eca13bf2bf5ebed22f7e13f46ddcafe66a6dac (patch)
tree077829cc5b09a93be758b8bb905e161ba7565c39 /Perl/demos/Tk
parentdea4ce32cdccac9867535440e754d7a95fa1d656 (diff)
downloadtkzinc-70eca13bf2bf5ebed22f7e13f46ddcafe66a6dac.zip
tkzinc-70eca13bf2bf5ebed22f7e13f46ddcafe66a6dac.tar.gz
tkzinc-70eca13bf2bf5ebed22f7e13f46ddcafe66a6dac.tar.bz2
tkzinc-70eca13bf2bf5ebed22f7e13f46ddcafe66a6dac.tar.xz
Zetris ne positionne plus de police par defaut pour tk
et donc ne devrait plus modifier les fontes utilis�es pour les autres demos de zinc-demos
Diffstat (limited to 'Perl/demos/Tk')
-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');