def display_help_window():
    from turtle import TK
    root = TK.Tk()
    frame = TK.Frame()
    canvas = TK.Canvas(root, width=300, height=200, bg="white")
    canvas.pack()
    help_screen = turtle.TurtleScreen(canvas)
    help_t = turtle.RawTurtle(help_screen)
    help_t.penup()
    help_t.hideturtle()
    help_t.speed('fastest')

    width, height = help_screen.screensize()
    line_height = 20
    y = height // 2 - 30
    for s in ("Click on cells to make them alive or dead.",
              "Keyboard commands:",
              " E)rase the board",
              " R)andom fill",
              " S)tep once or",
              " C)ontinuously -- use 'S' to resume stepping",
              " Q)uit"):
        help_t.setpos(-(width / 2), y)
        help_t.write(s, font=('sans-serif', 14, 'normal'))
        y -= line_height
Example #2
0
def display_help_window():
    from turtle import TK
    root = TK.Tk()
    frame = TK.Frame()
    canvas = TK.Canvas(root, width=200, height=250, bg="grey")
    canvas.pack()
    help_screen = turtle.TurtleScreen(canvas)
    help_t = turtle.RawTurtle(help_screen)
    help_t.penup()
    help_t.hideturtle()
    help_t.speed('fastest')

    width, height = help_screen.screensize()
    line_height = 20
    y = height // 2 - 30
    for s in ("Clique nas celulas para definir se estao vivas ou mortas",
              "Comandos do teclado:", " A)Apaga o quadro", " U)Uma geracao",
              " C)Geracao continua", " S)Sair"):
        help_t.setpos(-(width / 2), y)
        help_t.write(s, font=('sans-serif', 14, 'normal'))
        y -= line_height
    def display_help_window(self):
        from turtle import TK
        root = TK.Tk()
        frame = TK.Frame()
        canvas = TK.Canvas(root, width=300, height=200, bg="white")
        canvas.pack()
        help_screen = turtle.TurtleScreen(canvas)
        help_t = turtle.RawTurtle(help_screen)
        help_t.penup()
        help_t.hideturtle()
        help_t.speed('fastest')

        width, height = help_screen.screensize()
        line_height = 20
        y = height // 2 - 30
        for s in ("Click on cells to make them alive or dead.",
                  "Key commands:", " E- Erase ", " R- Random ",
                  " P- Upload Pic ", " S- Step ", " C- Loop ", " Q- Quit "):
            help_t.setpos(-(width / 2), y)
            help_t.write(s, font=('sans-serif', 14, 'normal'))
            y -= line_height
Example #4
0
def telaAjudaDisplay():
    from turtle import TK
    raiz = TK.Tk()
    frame = TK.Frame()
    quadro = TK.Canvas(raiz, width=200, height=250, bg="grey")
    quadro.pack()
    telaAjuda = turtle.TurtleScreen(quadro)
    ajudaT = turtle.RawTurtle(telaAjuda)
    ajudaT.penup()
    ajudaT.hideturtle()
    ajudaT.speed('fastest')

    largura, altura = telaAjuda.screensize()
    alturaLinha = 20
    y = altura // 2 - 30
    for s in ("Clique nas celulas para definir se estao vivas ou mortas",
              "Comandos do teclado:", " A)Apaga o quadro", " U)Uma geracao",
              " C)Geracao continua", " P)Pausar Geracao Continua", " S)Sair"):
        ajudaT.setpos(-(largura / 2), y)
        ajudaT.write(s, font=('sans-serif', 14, 'normal'))
        y -= alturaLinha
Example #5
0
def display_help_window():
    from turtle import TK
    root = TK.Tk()
    frame = TK.Frame()
    canvas = TK.Canvas(root, width=350, height=150, bg="white")
    canvas.pack()
    help_screen = turtle.TurtleScreen(canvas)
    help_t = turtle.RawTurtle(help_screen)
    help_t.penup()
    help_t.hideturtle()
    help_t.speed('fastest')

    width, height = help_screen.screensize()
    line_height = 20
    y = height // 2 - 30
    for s in ("Con un click las cambias entre vivas y muertas",
              " E es para borrar todo",
              " R es para llenarlo aleatoriamente",
              " S es para siguiente generacion",
              " C es para dar generaciones continuas",
              " Q para salir"):
        help_t.setpos(-(width / 2), y)
        help_t.write(s, font=('arial', 12, 'normal'))
        y -= line_height