Update of /cvsroot/freevo/freevo/src/skins/main
In directory sc8-pr-cvs1:/tmp/cvs-serv16985
Modified Files:
main.py
Log Message:
added Splashscreen support
Index: main.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/skins/main/main.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** main.py 25 Aug 2003 18:44:31 -0000 1.4
--- main.py 31 Aug 2003 14:17:16 -0000 1.5
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.5 2003/08/31 14:17:16 dischi
+ # added Splashscreen support
+ #
# Revision 1.4 2003/08/25 18:44:31 dischi
# Moved HOURS_PER_PAGE into the skin fxd file, default=2
***************
*** 52,55 ****
--- 55,59 ----
# The OSD class, used to communicate with the OSD daemon
import osd
+ import pygame
import stat
***************
*** 80,84 ****
import plugin
-
class Screen_Area(Skin_Area):
"""
--- 84,87 ----
***************
*** 218,221 ****
--- 221,254 ----
"""
+ class Splashscreen:
+ """
+ Splashscreen on startup
+ TODO: move image filename, colors and positions into the xml file
+ """
+ def __init__(self):
+ self.x0 = config.OVERSCAN_X + 20
+ self.x1 = osd.width - 2 * (config.OVERSCAN_X + 20)
+ self.y0 = osd.height - 100 - config.OVERSCAN_Y
+ self.y1 = self.y0 + 30
+
+ osd.clearscreen(color=osd.COL_BLACK)
+ image = osd.loadbitmap(os.path.join(config.IMAGE_DIR,
'splashscreen.jpg'))
+ image = pygame.transform.scale(image, (osd.width, osd.height))
+ osd.drawbitmap(image, 0, 0)
+ osd.update()
+ self.bg = pygame.Surface((self.x1 - self.x0, self.y1 - self.y0))
+ self.bg.blit(osd.screen, (0, 0), (self.x0, self.y0, self.x1 - self.x0,
+ self.y1 - self.y0))
+
+ def progress(self, pos):
+ pos = round(float((self.x1 - self.x0 - 2)) / (float(100) / pos))
+ osd.screen.blit(self.bg, (self.x0, self.y0))
+ osd.drawbox(self.x0, self.y0, self.x1, self.y1, 1)
+ osd.drawbox(self.x0+1, self.y0+1, self.x0 + 1 + pos, self.y1-1,
+ color=0xa0000000, fill=TRUE)
+ osd.update()
+
+
+
def __init__(self):
self.display_style = config.SKIN_START_LAYOUT
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog