I'd like to define a transform where "old_widget = None," but I'm having a hard time. Am I doing things all wrong??
My goal is to have a band wiperight near the top corner of my screen with the name of the song that I have playing. Then, after a moment, it will wipeleft and disappear.
This is what I currently have:
Code: Select all
transform music_intro(new_widget, old_widget = None):
parallel:
"notify.png" #the band image file
alpha 0.0 xalign 0 yalign 0 crop (0,0,0,35)
linear 1.0 alpha 1.0 crop (0,0,767,35) #wiperight (the size of notify.png is 767 x 35)
3.0 #wait a moment
linear 1.0 alpha 0.0 crop (0,0,0,35) #wipe left
parallel:
contains:
new_widget #the name of the song as a text expression
alpha 0.0 xalign 0 yalign 0 crop (0,0,0,35) size(767,35)
linear 1.0 alpha 1.0 crop (0,0,767,35) #wiperight
3.0 #wait a moment
linear 1.0 alpha 0.0 crop (0,0,0,35)
And this is how I'm trying to execute it:
Code: Select all
play music "Denial.ogg"
show expression Text("Denial") as new_widg with music_intro
The malfunction I'm getting is that the background jumps from what it's supposed to be to a transparent screen briefly, then it shows "Denial" at the bottom of the screen (default size) and it doesn't disappear.
Does anyone know the answer to this puzzle?
Thanks