Skip to content

Instantly share code, notes, and snippets.

@hansent
Created February 25, 2011 17:47
Show Gist options
  • Select an option

  • Save hansent/844181 to your computer and use it in GitHub Desktop.

Select an option

Save hansent/844181 to your computer and use it in GitHub Desktop.
#:kivy 1.0
<Label>:
font_name: 'Loma Book'
# Always clear the background of every child widget
# FIXME: this should be done in FBO of PageLayout... well.
<AppScreen>:
canvas:
Color:
rgb: 0, 0, 0
Rectangle:
pos: self.pos
size: self.size
<InfoScreen>:
progress: video_widget.position / max(0,.0001, video_widget.duration)
Image:
source: 'images/background.png'
Video:
id: video_widget
source: root.movie.trailer
play: True
pos: (0, 250)
Label:
text: root.movie.title
size_hint: (1, None)
pos: (0,480)
font_size: 60
bold: True
Label:
text: "Theater: 8 7:00pm - 9:00pm"
size_hint: (1, None)
pos: (0,325)
font_size: 30
Label:
text: "Theater: 5 8:30pm - 10:30pm"
size_hint: (1, None)
pos: (0,200)
font_name: 'Loma Book'
font_size: 30
Label:
text: "Theater: 3 9:30pm - 12:30pm"
size_hint: (1, None)
pos: (0,75)
font_name: 'Loma Book'
font_size: 30
<WelcomeScreen>
Image:
source: 'images/welcome.png'
BoxLayout:
#pos: 86, 158
#size: 916, 500
size_hint: (1, .33)
spacing: 50
padding: 50
canvas:
Color:
rgba:1,0,0,0.3
Rectangle:
size:self.size
pos: self.pos
MovieThumbnail:
play: root.play
app: root.app
movie: root.movies[0]
MovieThumbnail:
play: root.play
app: root.app
movie: root.movies[1]
MovieThumbnail:
play: root.play
app: root.app
movie: root.movies[2]
#
# Little thumbnail that will appear inside the welcome screen
#
<MovieThumbnail>:
on_touch_down: self.app.select_movie(self) if root.collide_point(*largs[2].pos) else None
BoxLayout:
orientation: 'vertical'
size: root.size
pos: root.pos
canvas:
Color:
rgba:0,1,0,0.3
Rectangle:
size:self.size
pos: self.pos
# Title label, centered in a box upside the video, with a margin of 10 pixels
Label:
size_hint: (1,None)
text: root.movie.title if root.movie else ''
text_size: self.size
halign: 'center'
font_size: 22
Video:
id: trailer1
source: root.movie.trailer if root.movie else ''
play: root.play
size_hint: (1, None)
canvas.before:
Color:
rgb: 0,0,0
Rectangle:
pos: self.pos
size: self.size
# Summary label, centered in a box downside the video, with a margin of 10 pixels
Label:
text: root.movie.summary[:100] if root.movie else ''
text_size: self.size
halign: 'center'
font_size: 12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment