- Fixed bug on slide transition when menu as been scrolled.

This commit is contained in:
noisymime 2008-02-14 07:00:35 +00:00
parent 42d3628579
commit 0d04d74ffe
3 changed files with 9 additions and 5 deletions

View File

@ -96,20 +96,22 @@ class VideoController:
self.isPlaying = False
self.video_texture.set_playing(False)
self.player.stop_video()
if t == gst.MESSAGE_BUFFERING:
elif t == gst.MESSAGE_BUFFERING:
percent = message.parse_buffering()
print "Buffer: " + str(percent)
if percent < 100:
self.bin.set_state(gst.STATE_PAUSED)
else:
self.bin.set_state(gst.STATE_PLAYING)
if t == gst.MESSAGE_STATE_CHANGED:
elif t == gst.MESSAGE_STATE_CHANGED:
prev, current, next = message.parse_state_changed()
#print "State Changed. Previous state: " + str(prev)
#print "State Changed. Current state: " + str(current)
elif t == gst.STREAM_ERROR:
#print "OHH NOES!"
print "GST Message: " + message.structure.to_string()
print "GST Stream Error: " + message.structure.to_string()
else:
if self.player.glossMgr.debug: print "GST Message: " + message.structure.to_string()
def stop_video(self):
if self.video_texture.get_playing():

View File

@ -326,6 +326,8 @@ class Interface(clutter.Group):
def get_current_item(self):
return self.menuItems[self.selected]
def get_group_y(self):
int(self.menuItems[self.displayMin].get_y())
class MenuListItem (MenuItem):

View File

@ -23,7 +23,7 @@ class Transition:
knots_exiting = (\
(fromMenu.get_x(), fromMenu.get_y()),\
#(-oldGroup.get_x(), int(fromMenu.getStage().get_height()/2))
(-fromMenu.get_x(), fromMenu.get_y())\
(-fromMenu.get_x(), fromMenu.get_group_y())\
)
self.exit_behaviour_path = clutter.BehaviourPath(knots=knots_exiting, alpha=self.alpha)
@ -47,7 +47,7 @@ class Transition:
#(toMenu.get_x(), toMenu.get_y()),\
(start_x, start_y),\
#(-oldGroup.get_x(), int(fromMenu.getStage().get_height()/2))
(end_x, end_y) \
(end_x, fromMenu.get_group_y()) \
#toMenu.get_display_position()
)
self.entrance_behaviour_path = clutter.BehaviourPath(self.alpha, knots_entering)