Games-Sudoku-SudokuTk

 view release on metacpan or  search on metacpan

lib/Games/Sudoku/menu.pm  view on Meta::CPAN

        my ($origine) = @_;
        #print "menu " . $origine . "\n";
        # definition of menu
        if ($origine ne "sudoku") {
                $menubar -> destroy;
        }
        $menubar = $main->Frame;
        $menubar->pack(
                -fill => 'x');
        # File menu
        my $fichiermenu = $menubar->Menubutton(-text => tr1('Fichier'));
        $fichiermenu->pack(
                '-side' => 'left');

        #save
        $fichiermenu->command(
                -label          => tr1('Sauver'),
                -command        => [\&sauve],
                -accelerator    => 'Ctrl+s'
        );
        $main->bind('<Control-s>' => [\&sauve]);

lib/Games/Sudoku/menu.pm  view on Meta::CPAN

        # Exit         
        $fichiermenu->command(
                -label          => tr1('Quitter'),
                -command        => [$main => 'destroy'],
                -accelerator    => 'Ctrl+q'
        );
        $main->bind('<Control-q>' => [$main => 'destroy']);
        
        if ($origine eq "affichgrille" or $origine eq "affichgrilleS" or $origine eq "sudoku"
                or $origine eq "V") {
                # Options Menu
                my $optionmenu = $menubar->Menubutton(-text => tr1('Options'));
                $optionmenu->pack(
                        '-side' => 'left');
                # resolve of a seized grid
                $optionmenu->command(
                        -label          => tr1('Resoudre une grille saisie'),
                        -command        => [\&affichgrille,"R"],
                        -accelerator    => 'Ctrl+s',
                );
                $main->bind('<Control-s>' => [\&affichgrille,"R"]);

lib/Games/Sudoku/menu.pm  view on Meta::CPAN

                        $optionmenu->command(
                                -label          => tr1('Solution'),
                                -command        => [\&solutiond,"S"],
                                -accelerator    => 'Ctrl+s',
                        );
                        my $text3 = tr1('Solution') . 'C+s\n';
                        $main->bind('Control-s>' => [\&solutiond,"S"]);
                }
        }
        # Drawing
        my $dessinmenu = $menubar->Menubutton(-text => tr1('affichage'));
        $dessinmenu->pack(
                '-side' => 'left');
        # selection of drawing of cases
        $dessinmenu->radiobutton(-label => tr1('chiffres'),
                -command => [sub{$dessin = "chiffres"}]);        
        $dessinmenu->radiobutton(-label => tr1('animaux'),
                -command => [sub{$dessin = "animaux"}]); 
        $dessinmenu->radiobutton(-label => tr1('lettres'),
                -command => [sub{$dessin = "lettres"}]);        
        $dessinmenu->radiobutton(-label => tr1('couleurs'),
                -command => [sub{$dessin = "couleurs"}]);   
        # Language Menu
        my $languemenu = $menubar->Menubutton(-text => tr1('Langues'));
        $languemenu->pack(
                '-side' => 'left');
        # selection of languages
        $languemenu->radiobutton(-label => tr1('français'),
                -command => [\&changelang,"fr"]);        
        $languemenu->radiobutton(-label => tr1('anglais'),
                -command => [\&changelang,"en"]);   
        $languemenu->radiobutton(-label => tr1('allemand'),
                -command => [\&changelang,"ge"]);
        $languemenu->radiobutton(-label => tr1('espagnol'),



( run in 0.545 second using v1.01-cache-2.11-cpan-49f99fa48dc )