Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter D. Vargas <pynash@gmail.com>2010-09-02 16:37:49 (GMT)
committer Walter D. Vargas <pynash@gmail.com>2010-09-02 16:37:49 (GMT)
commitf4e327f89b505955f29f52daf25fab47443e30f1 (patch)
tree8e4a1b01ed1bdd28e24a458638e4b5ced20564ac
parente87cc02ef22bbd60db21e9c2252e47328ec8899c (diff)
Checkbutton bandera, escudo. agregando las imagenes, reduciendo la cantidad de palabras a dictar por nivel y eliminando algunas carpetas que ya no se usan
-rw-r--r--1a.txt13
-rw-r--r--1b.txt17
-rw-r--r--1c.txt21
-rw-r--r--1d.txt14
-rw-r--r--1e.txt14
-rw-r--r--1f.txt15
-rw-r--r--1g.txt14
-rw-r--r--1h.txt15
-rw-r--r--1i.txt14
-rw-r--r--1j.txt15
-rw-r--r--1k.txt15
-rw-r--r--1l.txt16
-rw-r--r--1m.txt19
-rw-r--r--1n.txt14
-rw-r--r--1o.txt16
-rw-r--r--1p.txt17
-rw-r--r--1q.txt18
-rw-r--r--1r.txt19
-rw-r--r--1s.txt18
-rw-r--r--1t.txt20
-rw-r--r--Dictado.py410
-rw-r--r--nivel.txt2
-rw-r--r--resources/bandera.pngbin0 -> 2675 bytes
-rw-r--r--resources/escudo.pngbin0 -> 8332 bytes
-rw-r--r--resources/level_1/1.pngbin32300 -> 0 bytes
-rw-r--r--resources/level_2/2.pngbin43489 -> 0 bytes
-rw-r--r--resources/level_3/3.pngbin62015 -> 0 bytes
-rw-r--r--resources/level_3/profesor.gifbin5951 -> 0 bytes
28 files changed, 617 insertions, 119 deletions
diff --git a/1a.txt b/1a.txt
index 35ec750..f10f5e3 100644
--- a/1a.txt
+++ b/1a.txt
@@ -1,4 +1,13 @@
mamá
-papá
memo
-gato
+oso
+pesa
+loma
+lima
+palo
+lomo
+sala
+lupa
+paloma
+mula
+ala
diff --git a/1b.txt b/1b.txt
index 92dba0b..e780105 100644
--- a/1b.txt
+++ b/1b.txt
@@ -1,4 +1,13 @@
-perro
-ratón
-rata
-ratonera
+nena
+nulo
+pena
+luna
+pino
+mano
+maní
+pepino
+enano
+lana
+tomate
+maleta
+tuna
diff --git a/1c.txt b/1c.txt
index edc676e..6f4e115 100644
--- a/1c.txt
+++ b/1c.txt
@@ -1,3 +1,18 @@
-caramelo
-camello
-caballo
+dama
+lado
+pomada
+moneda
+nada
+soda
+saluda
+arena
+loro
+salero
+mariposa
+madera
+arete
+pera
+torero
+marino
+lora
+danilo
diff --git a/1d.txt b/1d.txt
new file mode 100644
index 0000000..17a0f61
--- /dev/null
+++ b/1d.txt
@@ -0,0 +1,14 @@
+rosa
+rana
+remo
+raso
+cara
+copa
+camisa
+corona
+capa
+pico
+saco
+loco
+rico
+carreta
diff --git a/1e.txt b/1e.txt
new file mode 100644
index 0000000..6e2172a
--- /dev/null
+++ b/1e.txt
@@ -0,0 +1,14 @@
+niña
+niño
+uña
+año
+moño
+paño
+señora
+mañana
+piña
+vela
+pavo
+venado
+verano
+pavito
diff --git a/1f.txt b/1f.txt
new file mode 100644
index 0000000..5deb567
--- /dev/null
+++ b/1f.txt
@@ -0,0 +1,15 @@
+cubo
+tabaco
+lobo
+bota
+basura
+baño
+bola
+banana
+gato
+goma
+amigo
+gotera
+laguna
+regalo
+gorra
diff --git a/1g.txt b/1g.txt
new file mode 100644
index 0000000..d4604e6
--- /dev/null
+++ b/1g.txt
@@ -0,0 +1,14 @@
+rayo
+mayo
+raya
+ayuno
+payaso
+papaya
+arroyo
+fila
+feliz
+foca
+café
+teléfono
+afónico
+farola
diff --git a/1h.txt b/1h.txt
new file mode 100644
index 0000000..63e07ee
--- /dev/null
+++ b/1h.txt
@@ -0,0 +1,15 @@
+hilo
+humo
+hora
+haba
+helado
+herida
+hada
+hamaca
+hábito
+jirafa
+jefe
+pájaro
+oveja
+oreja
+jardín
diff --git a/1i.txt b/1i.txt
new file mode 100644
index 0000000..31667db
--- /dev/null
+++ b/1i.txt
@@ -0,0 +1,14 @@
+zorra
+zumo
+zapato
+zona
+tiza
+pozo
+loza
+trozo
+buzo
+cabeza
+calabaza
+taza
+mozo
+cazó
diff --git a/1j.txt b/1j.txt
new file mode 100644
index 0000000..21c6ca1
--- /dev/null
+++ b/1j.txt
@@ -0,0 +1,15 @@
+olla
+botella
+pollito
+gallina
+capilla
+guitarra
+águila
+sigue
+laguito
+guerrero
+cepillo
+cereza
+cera
+racimo
+ceniza
diff --git a/1k.txt b/1k.txt
new file mode 100644
index 0000000..2d30f41
--- /dev/null
+++ b/1k.txt
@@ -0,0 +1,15 @@
+choza
+chivo
+chorizo
+chaleco
+noche
+chino
+cuchillo
+queso
+quijada
+queja
+química
+paquete
+pequeño
+quebrado
+buque
diff --git a/1l.txt b/1l.txt
new file mode 100644
index 0000000..64fe076
--- /dev/null
+++ b/1l.txt
@@ -0,0 +1,16 @@
+gemelo
+página
+gira
+gema
+gitano
+gigante
+gemir
+gelatina
+escudo
+pasto
+máscara
+poste
+pista
+pastora
+pescado
+pasta
diff --git a/1m.txt b/1m.txt
new file mode 100644
index 0000000..32451f5
--- /dev/null
+++ b/1m.txt
@@ -0,0 +1,19 @@
+patín
+cinta
+ratón
+capitán
+naranja
+indio
+botón
+arpa
+gordo
+azúcar
+barco
+jardín
+hormiga
+caimán
+paila
+suave
+patio
+radio
+indio
diff --git a/1n.txt b/1n.txt
new file mode 100644
index 0000000..78a6968
--- /dev/null
+++ b/1n.txt
@@ -0,0 +1,14 @@
+pastel
+dedal
+salsa
+mantel
+panal
+dedal
+salsa
+peine
+fiera
+siete
+hierro
+palacio
+genario
+reina
diff --git a/1o.txt b/1o.txt
new file mode 100644
index 0000000..910624a
--- /dev/null
+++ b/1o.txt
@@ -0,0 +1,16 @@
+llovizna
+timidez
+pez
+luz
+lápiz
+doctor
+lectura
+pacto
+acción
+infección
+injección
+rey
+hoy
+estoy
+muy
+carey
diff --git a/1p.txt b/1p.txt
new file mode 100644
index 0000000..39791b9
--- /dev/null
+++ b/1p.txt
@@ -0,0 +1,17 @@
+oxígeno
+maxilar
+texto
+excusa
+ónix
+óxido
+tórax
+campesino
+bombero
+bambú
+tambor
+combate
+marimba
+estampa
+tumba
+campana
+tambores
diff --git a/1q.txt b/1q.txt
new file mode 100644
index 0000000..764f796
--- /dev/null
+++ b/1q.txt
@@ -0,0 +1,18 @@
+público
+cable
+mueble
+niebla
+roble
+regleta
+gladiador
+iglesia
+globo
+flaco
+florero
+flecha
+florecita
+rifle
+flota
+fleco
+flotado
+reflejo
diff --git a/1r.txt b/1r.txt
new file mode 100644
index 0000000..53d2600
--- /dev/null
+++ b/1r.txt
@@ -0,0 +1,19 @@
+precio
+prado
+problema
+profesor
+primero
+sorpresa
+capricho
+promesa
+tribu
+truco
+trapo
+retrato
+cuatro
+sastre
+litro
+trineo
+estrella
+trajes
+trompo
diff --git a/1s.txt b/1s.txt
new file mode 100644
index 0000000..908bae4
--- /dev/null
+++ b/1s.txt
@@ -0,0 +1,18 @@
+cangrejo
+agricultor
+vinagre
+peligro
+fotógrafo
+sangre
+tigre
+grada
+drama
+droga
+padre
+madrina
+ladrillo
+ladrar
+taladro
+piedra
+cuadro
+madrugada
diff --git a/1t.txt b/1t.txt
new file mode 100644
index 0000000..d053777
--- /dev/null
+++ b/1t.txt
@@ -0,0 +1,20 @@
+brecha
+brisa
+sobrino
+sombrero
+fábrica
+sembrado
+libro
+cabra
+sobre
+hebra
+franela
+frutero
+freno
+friso
+fragua
+cofre
+frase
+azufre
+fresa
+walter
diff --git a/Dictado.py b/Dictado.py
index fd46fcf..4dbe894 100644
--- a/Dictado.py
+++ b/Dictado.py
@@ -1,6 +1,7 @@
# -*- coding: UTF-8 -*-
+
"""Desarrollo de un Dictado Robotizida o_0"""
-"""en proceso"""
+
#written by:
# Walter. D. Vargas <pynash@gmail.com>
# Yuri González <yurigonzalezni@gmail.com>
@@ -14,8 +15,10 @@ import logging
_logger = logging.getLogger()
_logger.setLevel(logging.DEBUG)
+
class Dictado:
def __init__(self):
+
#main window
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.connect("delete_event", self._delete_event_cb)
@@ -28,134 +31,215 @@ class Dictado:
self.words = []
self.nivel = []
self.correctos = []
+
+ subprocess.call("espeak -s 140 -v es-sc --stdout 'Bienvenido a la actividad Dictado' | aplay", shell=True)
#left container
self.contenedor_izq = gtk.VBox()
- self.label_theme = gtk.Label("Dictado de Palabras")
+ self.label_theme = gtk.Label("Selecciona Bandera o Escudo de Nicaragua")
self.contenedor_izq.pack_start(self.label_theme, False, False, 10)
self.label_theme.show()
+ self.hbox_image_check = gtk.HBox()
+
self.imagen_principal = gtk.Image()
- self.imagen_principal.set_from_file("resources/level_1/1.png")
- self.contenedor_izq.pack_start(self.imagen_principal, False, False, 20)
+ self.imagen_principal.set_from_file("resources/bandera.png")
+ self.hbox_image_check.pack_start(self.imagen_principal, True, True, 20)
self.imagen_principal.show()
- self.comenzar_dictado = gtk.Button(" Comenzar Dictado ")
- self.comenzar_dictado.set_sensitive(1)
- self.comenzar_dictado.connect("clicked", self._dictar_cb)
-
- self.cancelar = gtk.Button(" Cancelar ")
- self.cancelar.set_sensitive(0)
- self.cancelar.connect("clicked", self._cancela_cb, 0)
-
- self.opciones = gtk.HBox()
- self.opciones.pack_start(self.comenzar_dictado, False, False, 50)
- self.opciones.pack_start(self.cancelar, False, False, 50)
- self.comenzar_dictado.show()
- self.cancelar.show()
-
- self.contenedor_izq.pack_start(self.opciones, False, False, 50)
- self.opciones.show()
-
- self.hbox_repeat = gtk.HBox()
-
- self.repetir = gtk.Button(" Repetir Palabra ")
- self.repetir.set_sensitive(0)
- self.repetir.connect("clicked", self._repeat_cb)
- self.hbox_repeat.pack_start(self.repetir, False, False, 100)
- self.repetir.show()
+ self.vbox_check = gtk.VBox()
+
+ self.radio_buttons = gtk.RadioButton(None, "Bandera")
+ self.radio_buttons.set_active(False)
+ self.radio_buttons.connect("toggled", self._callback_rb_cb, "Bandera")
+ self.vbox_check.pack_start(self.radio_buttons, True, True, 0)
+ self.radio_buttons.show()
+
+ self.radio_buttons = gtk.RadioButton(self.radio_buttons, "Escudo")
+ self.radio_buttons.connect("toggled", self._callback_rb_cb, "Escudo")
+ self.radio_buttons.set_active(False)
+ self.vbox_check.pack_start(self.radio_buttons, True, True, 0)
+ self.radio_buttons.show()
+
+ #self.hbox_image_check.pack_start(self.imagen_principal, False, False, 0)
+ self.hbox_image_check.pack_start(self.vbox_check, False, False, 0)
+ self.vbox_check.show()
+ self.imagen_principal.show()
- self.contenedor_izq.pack_start(self.hbox_repeat, False, False, 50)
- self.hbox_repeat.show()
+ self.contenedor_izq.pack_start(self.hbox_image_check, False, False, 20)
+ self.hbox_image_check.show()
self.hbox_1 = gtk.HBox()
- self.hbox_1.pack_start(self.contenedor_izq, False, False, 0)
+ self.hbox_1.pack_start(self.contenedor_izq, False, False, 30)
self.contenedor_izq.show()
- #self.imagen_principal = gtk.Image()
-
#end left container
#begining container right
self.contenedor_der = gtk.VBox()
- self.label_info = gtk.Label("Inicio de Juego")
+ self.label_info = gtk.Label("Inicio de Juego\n")
self.label_info.set_sensitive(1)
self.contenedor_der.pack_start(self.label_info, False, False, 10)
self.label_info.show()
- self.label_correct = gtk.Label("Palabras Acertadas")
- self.contenedor_der.pack_start(self.label_correct, False, False, 10)
- self.label_correct.show()
-
- self.list_correct = gtk.TextView()
- self.list_correct.set_editable(False)
- self.list_correct.set_cursor_visible(False)
-
- self.buffer = self.list_correct.get_buffer()
- self.buffer.set_text("")
+ self.comenzar_dictado = gtk.Button("Comenzar Dictado")
+ self.comenzar_dictado.show()#set_sensitive(1)
+ self.comenzar_dictado.set_size_request(210, 35)
+ self.comenzar_dictado.connect("clicked", self._dictar_cb)
- self.contenedor_der.pack_start(self.list_correct, False, False, 10)
- self.list_correct.show()
+ self.contenedor_der.pack_start(self.comenzar_dictado, False, False, 10)
+ self.comenzar_dictado.show()
- self.salir = gtk.Button(" Salir ")
- self.salir.connect("clicked", self._salir_cb)
+ self.cancelar = gtk.Button("Cancelar")
+ self.cancelar.hide()
+ self.cancelar.set_size_request(210, 35)
+ self.cancelar.connect("clicked", self._cancela_cb, 0)
- self.contenedor_der.pack_start(self.salir, False, False, 40)
- self.salir.show()
+ self.contenedor_der.pack_start(self.cancelar, False, False, 0)
+ self.cancelar.hide()
- self.jugar_again = gtk.Button(" Volver a Jugar ")
+ self.jugar_again = gtk.Button("Volver a Jugar")
self.jugar_again.connect("clicked", self._again_cb)
- self.jugar_again.set_sensitive(0)
- self.contenedor_der.pack_start(self.jugar_again, False, False, 30)
- self.jugar_again.show()
+ self.jugar_again.hide()
+ self.jugar_again.set_size_request(210, 35)
+ self.contenedor_der.pack_start(self.jugar_again, False, False, 5)
+
+ self.jugar_intento = gtk.Button("Intentar de Nuevo")
+ self.jugar_intento.connect("clicked", self._again_cb)
+ self.jugar_intento.hide()
+ self.jugar_intento.set_size_request(210, 35)
+ self.contenedor_der.pack_start(self.jugar_intento, False, False, 5)
#container with container right and left
- self.hbox_1.pack_start(self.contenedor_der, False, False, 0)
+ self.hbox_1.pack_start(self.contenedor_der, False, False, 100)
self.contenedor_der.show()
#Aqui va entry y aceptar
self.hbox_2 = gtk.HBox()
+ self.align_repetir = gtk.Alignment(0.5, 0.5, 0, 0)
+ self.align_repetir.add(self.hbox_2)
+ self.align_repetir.show()
+
self.texto = gtk.Entry(200)
+ self.texto.set_size_request(210, 35)
self.texto.set_sensitive(0)
- self.hbox_2.pack_start(self.texto, False, False, 70)
+ self.hbox_2.pack_start(self.texto, False, False, 20)
self.texto.show()
self.word = self.texto
- self.aceptar = gtk.Button(" Aceptar ")
+ self.aceptar = gtk.Button("Aceptar")
self.aceptar.set_sensitive(0)
+ self.aceptar.set_size_request(210, 35)
self.aceptar.connect("clicked", self._aceptar_cb)
- self.hbox_2.pack_start(self.aceptar, False, False, 70)
+ self.hbox_2.pack_start(self.aceptar, False, False, 20)
self.aceptar.show()
+ #vbox3
+
+ self.vbox3 = gtk.VBox()
+
+ self.label_correct = gtk.Label("Palabras Acertadas")
+ self.vbox3.pack_start(self.label_correct, False, False, 10)
+ self.label_correct.show()
+
+ self.list_correct = gtk.TextView()
+ self.list_correct.set_editable(False)
+ self.list_correct.set_cursor_visible(False)
+
+ self.buffer = self.list_correct.get_buffer()
+ self.buffer.set_text("")
+
+ self.scrolled = gtk.ScrolledWindow()
+ self.scrolled.set_policy(True, False)
+
+ self.scrolled.set_size_request(30, 200)
+
+ self.vbox3.pack_start(self.scrolled, False, False, 10)
+ self.scrolled.show()
+
+ self.scrolled.add_with_viewport(self.list_correct)
+ self.list_correct.show()
+
+ self.salir = gtk.Button("Salir")
+ self.salir.set_size_request(210, 35)
+ self.salir.connect("clicked", self._salir_cb)
+
+ self.vbox3.pack_start(self.salir, False, False, 5)
+ self.salir.show()
+
+ self.hbox_1.pack_start(self.vbox3, False, False, 100)
+ self.vbox3.show()
self.vbox_principal = gtk.VBox()
- self.vbox_principal.pack_start(self.hbox_1, False, False, 0)
- self.vbox_principal.pack_start(self.hbox_2, False, False, 0)
+
+ self.label_head = gtk.Label("Actividad Dictado de Palabras")
+ self.vbox_principal.pack_start(self.label_head, True, True, 40)
+ self.label_head.show()
+
+ self.vbox_principal.pack_start(self.hbox_1, True, True, 40)
+ self.vbox_principal.pack_start(self.align_repetir, True, True, 40)
+
+ self.repetir = gtk.Button("Repetir Palabra")
+ self.repetir.set_sensitive(0)
+ self.repetir.set_size_request(210, 35)
+ self.repetir.connect("clicked", self._repeat_cb)
+ self.repetir.show()
+ self.hbox_ultimo = gtk.HBox()
+ align_ul = gtk.Alignment(0.5, 0.5, 0, 0)
+ align_ul.add(self.hbox_ultimo)
+ self.hbox_ultimo.show()
+ self.hbox_ultimo.pack_start(self.repetir, False, False, 0)
+ self.repetir.show()
+ align_ul.show()
+
+ self.vbox_principal.pack_start(align_ul, True, True, 20)
+
self.hbox_2.show()
self.hbox_1.show()
-
- self.window.add(self.vbox_principal)
+
+ self.align = gtk.Alignment(0.5, 0.5, 0, 0)
+ vboxPRUEBA = gtk.VBox()
+
+ vboxPRUEBA.pack_start(self.align, False, False, 0)
+ self.align.show()
+
+ self.align.add(self.vbox_principal)
self.vbox_principal.show()
+
+ self.window.add(vboxPRUEBA)
+ vboxPRUEBA.show()
self.window.show()
self.num_clic = 0
self.aciertos = 0
- def _cambiar_imagen(self, level, img):
- ruta = "resources/level_%s/%s.png" % (level, img)
- self.imagen_principal.set_from_file(ruta)
+ def _callback_rb_cb(self, widget, data=None):
+ # se debera agregar posteriormente funcion de tomar foto y agregarlas, de 1ro a 6to.
+ #como primera configuración despues solo quedara jugando al dictado
+
+ if widget.get_active():
+ if data == "Bandera":
+ self.imagen_principal.set_from_file("resources/bandera.png")
+ else:
+ self.imagen_principal.set_from_file("resources/escudo.png")
def _again_cb(self, widget):
- self._activa_desactiva_cb(1)
- self._act_desact_operacion_cb(0)
- widget.set_sensitive(0)
- self.label_info.set_label("Inicio del Juego")
+ if widget.get_label()=="Volver a Jugar":
+ self._activa_desactiva_cb(1)
+ self._act_desact_operacion_cb(0)
+ widget.hide()
+ self.label_info.set_label("Inicio del Juego")
+ else:
+ self._activa_desactiva_cb(1)
+ self._act_desact_operacion_cb(0)
+ widget.hide()
+ self.label_info.set_label("Intentando de Nuevo")
def _repeat_cb(self, widget):
subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.word, shell=True)
@@ -168,7 +252,7 @@ class Dictado:
def _pc(self, widget):
if self.num_clic < (len(self.words)):
self.word = self.words[self.num_clic] #Asigno el valor a una variable, e introduzco ésta a los métodos
- subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.word, shell=True)
+ subprocess.call("espeak -s 150 -v es-sc --stdout ',siguiente palabra , %s' | aplay" % self.word, shell=True)
else:
if self.aciertos == len(self.words):
if self.nivel != 3:
@@ -176,91 +260,200 @@ class Dictado:
self._write_cb("nivel.txt", str(self.nivel))
self.aciertos = 0
self.num_clic = 0
- self.comenzar_dictado.set_sensitive(1)
- self.cancelar.set_sensitive(0)
+ self.comenzar_dictado.show()
+ self.cancelar.hide()
self._act_desact_operacion_cb(0)
- subprocess.call("espeak -s 130 -v es-sc --stdout 'Has Avanzado al siguiente Nivel' | aplay", shell=True)
- self.label_info.set_text("¡avanzaste al Siguiente Nivel!")
- for i in len(self.correctos):
- self.buffer.insert(i, self.correctos[i-1])
- del self.correctos[:]
+ subprocess.call("espeak -s 130 -v es-sc --stdout 'Excelente, Has avanzado al Siguiente Nivel' | aplay", shell=True)
+ self.label_info.set_text("Siguiente Nivel!\n")
else:
- for i in self.correctos:
- self.buffer.set_text(i)
- #subprocess.call("espeak -s 130 -v es-sc --stdout 'Enhorabuena, Felicidades has concluido el dictado muy bien' | aplay" % self.words[(self.num_clic)-1], shell=True)
- subprocess.call("espeak -s 130 -v es-sc --stdout 'Enhorabuena, Felicidades has concluido el dictado muy bien' | aplay", shell=True)
- self.label_info.set_label("¡Has Concluido Exitosamente!")
+ subprocess.call("espeak -s 130 -v es-sc --stdout 'En horabuena, Felicidades has concluido el dictado muy bien' | aplay", shell=True)
+ self.label_info.set_label("¡Dictado exitoso!\n")
self._write_cb("nivel.txt", str(1))
self.aciertos = 0
self.num_clic = 0
- self.cancelar.set_sensitive(0)
+ self.cancelar.hide()
self._act_desact_operacion_cb(0)
- self.jugar_again.set_sensitive(1)
+ self.jugar_again.show()
del self.correctos[:]
else:
- for i in self.correctos:
- self.buffer.set_text(i)
- subprocess.call("espeak -s 130 -v es-sc --stdout 'no avanzaste al siguiente nivel' | aplay", shell=True)
- self.label_info.set_text("¡Has Fallado!")
+ subprocess.call("espeak -s 130 -v es-sc --stdout 'Intento fallido' | aplay", shell=True)
+ self.label_info.set_text("¡Has Fallado!\n")
self.num_clic = 0
self.aciertos = 0
self._act_desact_operacion_cb(0)
- self.cancelar.set_sensitive(0)
- self.comenzar_dictado.set_sensitive(1)
+ self.cancelar.hide()
+ self.comenzar_dictado.hide()
+ self.jugar_intento.show()
del self.correctos[:]
def _aceptar_cb(self, widget, data=None):
if self.texto.get_text() != "":
self.num_clic += 1
if self.texto.get_text() == self.words[(self.num_clic) - 1]:
- subprocess.call("espeak -s 130 -v es-sc --stdout 'correcto, has escrito bien la palabra %s' | aplay" % self.words[(self.num_clic) - 1], shell=True)
+ subprocess.call("espeak -s 140 -v es-sc --stdout 'correcto, has escrito bien la palabra %s' | aplay" % self.words[(self.num_clic) - 1], shell=True)
self._autocall_cb(100, self.aceptar)#3 es tiempo
self.texto.set_text("")
self.aciertos += 1
- self.correctos.append(self.words[(self.num_clic - 1)])
+ end_buff = self.buffer.get_end_iter()
+ self.buffer.insert(end_buff, self.words[(self.num_clic)-1]+"\n")
else:
- #self.num_clic -= 1
subprocess.call("espeak -s 130 -v es-sc --stdout 'error, escribiste mal la palabra' | aplay", shell=True)
self._autocall_cb(100, self.aceptar)
self.texto.set_text("")
def _dictar_cb(self, widget, data=None):
- self.cancelar.set_sensitive(1)
- self.comenzar_dictado.set_sensitive(False)
+ self.buffer.set_text("")
+ self.cancelar.show()
+ self.comenzar_dictado.hide()
self._act_desact_operacion_cb(1)
self.nivel = self._open_nivel("nivel.txt")
self.nivel = int(self.nivel[0])
if self.nivel == 1:
- self.label_info.set_label("Nivel 1")
+ self.label_info.set_label("Nivel 1 \n")
self.words = self._open_file("1a.txt")
- self._cambiar_imagen(1, 1)
-
self.word = self.words[0]
subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
elif self.nivel == 2:
- self.label_info.set_label("Nivel 2")
+ self.label_info.set_label("Nivel 2 \n")
self.words = self._open_file("1b.txt")
- self._cambiar_imagen(2, 2)
-
self.word = self.words[0]
subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
- else:
- self.label_info.set_label("Nivel 3")
+ elif self.nivel == 3:
+ self.label_info.set_label("Nivel 3 \n")
self.words = self._open_file("1c.txt")
- self._cambiar_imagen(3, 3)
+ self.word = self.words[0]
+
+ subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
+ elif self.nivel == 4:
+ self.label_info.set_label("Nivel 4 \n")
+ self.words = self._open_file("1d.txt")
+
+ self.word = self.words[0]
+
+ subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
+ elif self.nivel == 5:
+ self.label_info.set_label("Nivel 5 \n")
+ self.words = self._open_file("1e.txt")
+
+ self.word = self.words[0]
+
+ subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
+ elif self.nivel == 6:
+ self.label_info.set_label("Nivel 6 \n")
+ self.words = self._open_file("1f.txt")
+
+ self.word = self.words[0]
+
+ subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
+ elif self.nivel == 7:
+ self.label_info.set_label("Nivel 7 \n")
+ self.words = self._open_file("1g.txt")
+
+ self.word = self.words[0]
+
+ subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
+ elif self.nivel == 8:
+ self.label_info.set_label("Nivel 8 \n")
+ self.words = self._open_file("1h.txt")
+
+ self.word = self.words[0]
+
+ subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
+ elif self.nivel == 9:
+ self.label_info.set_label("Nivel 9 \n")
+ self.words = self._open_file("1i.txt")
+
+ self.word = self.words[0]
+
+ subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
+ elif self.nivel == 10:
+ self.label_info.set_label("Nivel 10 \n")
+ self.words = self._open_file("1j.txt")
+
+ self.word = self.words[0]
+
+ subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
+ elif self.nivel == 11:
+ self.label_info.set_label("Nivel 11 \n")
+ self.words = self._open_file("1k.txt")
+
+ self.word = self.words[0]
+
+ subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
+ elif self.nivel == 12:
+ self.label_info.set_label("Nivel 12 \n")
+ self.words = self._open_file("1l.txt")
+
+ self.word = self.words[0]
+
+ subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
+ elif self.nivel == 13:
+ self.label_info.set_label("Nivel 13 \n")
+ self.words = self._open_file("1m.txt")
+
+ self.word = self.words[0]
+
+ subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
+ elif self.nivel == 14:
+ self.label_info.set_label("Nivel 14 \n")
+ self.words = self._open_file("1n.txt")
+
+ self.word = self.words[0]
+
+ subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
+ elif self.nivel == 15:
+ self.label_info.set_label("Nivel 15 \n")
+ self.words = self._open_file("1o.txt")
+
+ self.word = self.words[0]
+
+ subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
+ elif self.nivel == 16:
+ self.label_info.set_label("Nivel 16 \n")
+ self.words = self._open_file("1p.txt")
+
+ self.word = self.words[0]
+
+ subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
+ elif self.nivel == 17:
+ self.label_info.set_label("Nivel 17 \n")
+ self.words = self._open_file("1q.txt")
+
+ self.word = self.words[0]
+
+ subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
+ elif self.nivel == 18:
+ self.label_info.set_label("Nivel 18 \n")
+ self.words = self._open_file("1r.txt")
+
+ self.word = self.words[0]
+
+ subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
+ elif self.nivel == 19:
+ self.label_info.set_label("Nivel 19 \n")
+ self.words = self._open_file("1s.txt")
+
+ self.word = self.words[0]
+
+ subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
+ else:
+ self.label_info.set_label("Nivel 20 \n")
+ self.words = self._open_file("1t.txt")
self.word = self.words[0]
subprocess.call("espeak -s 100 -v es-sc --stdout %s | aplay" % self.words[0], shell=True)
def _activa_desactiva_cb(self, i):
- self.comenzar_dictado.set_sensitive(i)
- #self.cancelar.set_sensitive(i)
+ if i==0:
+ self.comenzar_dictado.hide()#set_sensitive(i)
+ else:
+ self.comenzar_dictado.show()
def _act_desact_operacion_cb(self, i):
self.texto.set_sensitive(i)
@@ -268,12 +461,11 @@ class Dictado:
self.repetir.set_sensitive(i)
def _cancela_cb(self, widget, i ):
- self.label_info.set_text("Inicio del Juego")
+ self.label_info.set_text("Inicio del Juego \n")
self._activa_desactiva_cb(1)
self._act_desact_operacion_cb(0)
- self.cancelar.set_sensitive(0)
+ self.cancelar.hide()
self.num_clic = 0
- #self.palabra.set_text("")
def _open_nivel(self, file):
line = []
diff --git a/nivel.txt b/nivel.txt
index 56a6051..d8263ee 100644
--- a/nivel.txt
+++ b/nivel.txt
@@ -1 +1 @@
-1 \ No newline at end of file
+2 \ No newline at end of file
diff --git a/resources/bandera.png b/resources/bandera.png
new file mode 100644
index 0000000..05b6a0b
--- /dev/null
+++ b/resources/bandera.png
Binary files differ
diff --git a/resources/escudo.png b/resources/escudo.png
new file mode 100644
index 0000000..c849bd2
--- /dev/null
+++ b/resources/escudo.png
Binary files differ
diff --git a/resources/level_1/1.png b/resources/level_1/1.png
deleted file mode 100644
index 9fea126..0000000
--- a/resources/level_1/1.png
+++ /dev/null
Binary files differ
diff --git a/resources/level_2/2.png b/resources/level_2/2.png
deleted file mode 100644
index 6656eed..0000000
--- a/resources/level_2/2.png
+++ /dev/null
Binary files differ
diff --git a/resources/level_3/3.png b/resources/level_3/3.png
deleted file mode 100644
index 5c73b9d..0000000
--- a/resources/level_3/3.png
+++ /dev/null
Binary files differ
diff --git a/resources/level_3/profesor.gif b/resources/level_3/profesor.gif
deleted file mode 100644
index caa211c..0000000
--- a/resources/level_3/profesor.gif
+++ /dev/null
Binary files differ