diff options
Diffstat (limited to 'JAMCalendar.py')
-rw-r--r-- | JAMCalendar.py | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/JAMCalendar.py b/JAMCalendar.py index 1fefa1c..8737a6d 100644 --- a/JAMCalendar.py +++ b/JAMCalendar.py @@ -1,13 +1,14 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# BiblioJAM (Versión 2.0) - 28/05/2011 - CeibalJAM! - Uruguay -# JAMCalendar.py por: Flavio Danesse fdanesse@gmail.com -# https://sites.google.com/site/flaviodanesse/ -# https://sites.google.com/site/sugaractivities/ -# http://codigosdeejemplo.blogspot.com/ +import pygame +import gc +import sys +import gobject +import time +import datetime +import os -import pygame, gc, sys, gobject, time, datetime, os from pygame.locals import * gc.enable() pygame.font.init() @@ -152,13 +153,13 @@ class JAMCalendar(pygame.sprite.OrderedUpdates): def set_text_fechas(self, tipo= False, tamanio= False, color= False): ''' Setea tipo, tamaño y color de la letra en los botones de fecha. ''' cambios= False - if tipo: + if tipo: self.datos_fechas_text["tipo"]= tipo cambios= True - if tamanio: + if tamanio: self.datos_fechas_text["tamanio"]= tamanio cambios= True - if color: + if color: self.datos_fechas_text["color"]= color cambios= True @@ -180,7 +181,7 @@ class JAMCalendar(pygame.sprite.OrderedUpdates): if fuente: self.datos_fechas_text["font_from_file"]= fuente cambios= True - if tamanio: + if tamanio: self.datos_fechas_text["tamanio"]= tamanio cambios= True @@ -199,13 +200,13 @@ class JAMCalendar(pygame.sprite.OrderedUpdates): def set_text_dias(self, tipo= False, tamanio= False, color= False): ''' Setea tipo, tamaño y color de la letra en los botones de dias. ''' cambios= False - if tipo: + if tipo: self.datos_dias_text["tipo"]= tipo cambios= True - if tamanio: + if tamanio: self.datos_dias_text["tamanio"]= tamanio cambios= True - if color: + if color: self.datos_dias_text["color"]= color cambios= True @@ -227,7 +228,7 @@ class JAMCalendar(pygame.sprite.OrderedUpdates): if fuente: self.datos_dias_text["font_from_file"]= fuente cambios= True - if tamanio: + if tamanio: self.datos_dias_text["tamanio"]= tamanio cambios= True @@ -247,13 +248,13 @@ class JAMCalendar(pygame.sprite.OrderedUpdates): def set_text_cabecera(self, tipo= False, tamanio= False, color= False): ''' Setea tipo, tamaño y color de la letra en los botones de dias. ''' cambios= False - if tipo: + if tipo: self.datos_cabecera_text["tipo"]= tipo cambios= True - if tamanio: + if tamanio: self.datos_cabecera_text["tamanio"]= tamanio cambios= True - if color: + if color: self.datos_cabecera_text["color"]= color cambios= True @@ -275,7 +276,7 @@ class JAMCalendar(pygame.sprite.OrderedUpdates): if fuente: self.datos_cabecera_text["font_from_file"]= fuente cambios= True - if tamanio: + if tamanio: self.datos_cabecera_text["tamanio"]= tamanio cambios= True @@ -307,7 +308,7 @@ class JAMCalendar(pygame.sprite.OrderedUpdates): # -----------------SETEOS Que no afectan al tamaño ------------------- def set_posicion(self, punto= (0,0)): if type(punto)== tuple and len(punto)== 2: - if type(punto[0])== int and type(punto[1])== int: + if type(punto[0])== int and type(punto[1])== int: retiro1= self.datos_base["retiro1"] grosorborde1= self.datos_base["grosorborde1"] retiro2= self.datos_base["retiro2"] @@ -536,7 +537,7 @@ class Botones_Fechas(pygame.sprite.OrderedUpdates): def set_posicion(self, punto= (0,0)): if type(punto)== tuple and len(punto)== 2: - if type(punto[0])== int and type(punto[1])== int: + if type(punto[0])== int and type(punto[1])== int: self.posicion= punto x,y = self.posicion yy= y @@ -591,7 +592,7 @@ class Botones_Dias(pygame.sprite.OrderedUpdates): def set_posicion(self, punto= (0,0)): ''' Setea la posición de todos los botones. ''' if type(punto)== tuple and len(punto)== 2: - if type(punto[0])== int and type(punto[1])== int: + if type(punto[0])== int and type(punto[1])== int: self.posicion= punto x,y= self.posicion for boton in self.matriz_botones: @@ -682,7 +683,7 @@ class Cabecera(pygame.sprite.OrderedUpdates): self.boton_next= JAMButton(">>", None) self.matriz_botones.append(self.boton_next) - self.boton_next.connect(callback= self.get_next_mes, sonido_select= None) + self.boton_next.connect(callback= self.get_next_mes, sonido_select= None) def set_text(self): ''' Seteos de texto en botones. ''' @@ -699,7 +700,7 @@ class Cabecera(pygame.sprite.OrderedUpdates): def set_posicion(self, punto= (0,0)): ''' Setea la posición de todos los botones. ''' if type(punto)== tuple and len(punto)== 2: - if type(punto[0])== int and type(punto[1])== int: + if type(punto[0])== int and type(punto[1])== int: self.posicion= punto x,y= self.posicion self.boton_previous.set_posicion(punto= (x,y)) |