| Issue 221: | MTFlippableWidget Bug | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? I have many flappable widgets with an image in front and in back, all the flips added in the same scatterWidget when I touch them they flip, but if the last flippable, the most left one is backside when I flip the first one, the left one looses its image and gets blank, if I flip its rigth neibor and flip the first one again, it becomes blank too and so on until all the flippable widgets desapear in the screen. if I flip a bland flippable, it only shows the back image every turn. What is the expected output? What do you see instead? The first flippable shouldn't change the last flappable What version of the product are you using? On what operating system? pymt-0.4-win32-full-py26 on windows xp professional Please provide any additional information below. an application is attached, if its my mistake or if it's solved, please contact me, simbaedu@yahoo.com.br
Mar 3, 2010
(No comment was entered for this change.)
Jul 2, 2010
(No comment was entered for this change.)
Labels:
Milestone-0.5
|
After some playing with your demo, you got a conflict between ScatterImage and touchs. Don't use ScatterImage if you just want to show an image. You can use MTContainer() (an abstract container to display anything from Core package) + Image (from Core package). => MTContainer(Image(filename)) = an image widget So in your code, it would be: front_image = MTContainer(Image( os.path.join(current_dir, 'front%d.jpg' % i))) back_image = MTContainer(Image( os.path.join(current_dir, 'back%d.jpg' % i))) Then, you'll see that it not changing at the good moment. Flippable widget have a trouble with that if the widget is not centered to the window. For you, i've added flipangle attribute to FlippableWidget. And with by-hand adjust, i've found this to work very well : flip = MTFlippableWidget(size=[204.8, self.height], pos=[204 * i, 0 ], flipangle=90+40-i*20) I hope you'll be happy :)Labels: Milestone-0.4.1 Component-Core