gcompris r3456 - branches/gcomprixogoo/src/anim-activity
- From: bcoudoin svn gnome org
- To: svn-commits-list gnome org
- Subject: gcompris r3456 - branches/gcomprixogoo/src/anim-activity
- Date: Sun, 1 Jun 2008 20:54:12 +0000 (UTC)
Author: bcoudoin
Date: Sun Jun 1 20:54:12 2008
New Revision: 3456
URL: http://svn.gnome.org/viewvc/gcompris?rev=3456&view=rev
Log:
the timeline has the drawning area ratio.
removed the 'take picture' tool, the timeline plays this role now.
Modified:
branches/gcomprixogoo/src/anim-activity/AnimItem.py
branches/gcomprixogoo/src/anim-activity/Timeline.py
branches/gcomprixogoo/src/anim-activity/anim.py
Modified: branches/gcomprixogoo/src/anim-activity/AnimItem.py
==============================================================================
--- branches/gcomprixogoo/src/anim-activity/AnimItem.py (original)
+++ branches/gcomprixogoo/src/anim-activity/AnimItem.py Sun Jun 1 20:54:12 2008
@@ -302,7 +302,12 @@
def display_at_time(self, time):
- self.show(self.is_visible(time))
+ if self.is_visible(time):
+ self.show(True)
+ else:
+ self.show(False)
+ # No need to waste more time there
+ return
# If we have a value at that time, use it.
if self.timeline.has_key(time):
Modified: branches/gcomprixogoo/src/anim-activity/Timeline.py
==============================================================================
--- branches/gcomprixogoo/src/anim-activity/Timeline.py (original)
+++ branches/gcomprixogoo/src/anim-activity/Timeline.py Sun Jun 1 20:54:12 2008
@@ -33,6 +33,7 @@
self.drawing_area = anim.drawing_area
self.running = False
+ self.zoom = 1
self.selected = None
self.timelinelist = []
self.current_time = 0
@@ -53,8 +54,12 @@
x1 = self.drawing_area[0]
x2 = self.drawing_area[2]
y = self.drawing_area[3] + 5
- w = 20
- h = 30
+
+ # Our timeline repesentation respects the drawing area ratio
+ self.zoom = (( self.drawing_area[2] - self.drawing_area[0] ) /
+ ( self.drawing_area[3] - self.drawing_area[1] ))
+ h = 27
+ w = h * self.zoom
i = x1
Modified: branches/gcomprixogoo/src/anim-activity/anim.py
==============================================================================
--- branches/gcomprixogoo/src/anim-activity/anim.py (original)
+++ branches/gcomprixogoo/src/anim-activity/anim.py Sun Jun 1 20:54:12 2008
@@ -115,7 +115,6 @@
["SAVE", "draw/tool-save.png", "draw/tool-save.png", gcompris.CURSOR_SELECT],
["LOAD", "draw/tool-load.png", "draw/tool-load.png", gcompris.CURSOR_SELECT],
["MOVIE", "draw/tool-movie.png", "draw/tool-movie_on.png", gcompris.CURSOR_SELECT],
- ["PICTURE", "draw/tool-camera.png", "draw/tool-camera_on.png", gcompris.CURSOR_SELECT],
["RECT", "draw/tool-rectangle.png", "draw/tool-rectangle_on.png", gcompris.CURSOR_RECT],
["FILL_RECT", "draw/tool-filledrectangle.png", "draw/tool-filledrectangle_on.png", gcompris.CURSOR_FILLRECT],
["CIRCLE", "draw/tool-circle.png", "draw/tool-circle_on.png", gcompris.CURSOR_CIRCLE],
@@ -401,7 +400,6 @@
gcompris.sound.play_ogg("sounds/bleep.wav")
# Some button have instant effects
if (self.tools[tool][0] == "SAVE"):
-# self.Anim2Shot()
gcompris.file_selector_save( self.gcomprisBoard,
self.selector_section, self.file_type,
general_save)
@@ -422,10 +420,6 @@
image_selected);
return False
- elif (self.tools[tool][0] == "PICTURE"):
- self.Anim2Shot()
- return False
-
elif (self.tools[tool][0] == "MOVIE"):
if len(self.animlist) == 0:
print 'Mmm... Need to make shots before run anim !!'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]