[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] Pulsing icon with edje



Am Tue, 29 Aug 2006 19:18:04 +0000 schrieb Pierre Cassimans:

> > > Hi,
> > >
> > > I'm playing with edje and try to create an icon which pulses one
> > > time after clicking on it. I found a mouse over pulsing example
> > > and tried to modify it. But it doesn't work correct. Could
> > > someone help me to find the problem?
> >
> >I solved the problem. Now it's working great, Thanks.
> >
> >Andreas
> 
> Do you mind posting your working code or tell me how you fixed it?

Sure. Here is a minimal example. But there's still a little problem. If
you press on the icon it moves some pixel up and som left before the
effect starts. Same at the end of the effect. You need to press the
button several times and look very good. It's not easy to see the first
time. Any ideas?

regards
Andreas

--------------------------> button1.png attached

// Sample EDC
images {
        image,  "button1.png" COMP;
}

collections {
   group {
      name, "pulsing2";
      min, 400 400;
      max, 1024 768;

      parts {

        part {
                name,   "button_button1";
                type,   IMAGE;
                mouse_events, 1;

                description {
                        state, "default" 0.0;
                        min, 0 0;
                        max, 64 64;

                        rel1 {
                                relative, 0 0;
                                offset, 0 0;
                        }

                       image {
                                normal, "button1.png";
                      }
                }

                description {
                        state, "pulsed1" 0.0;
                        min, 0 0;
                        max, 128 128;

                        color, 255 255 255 128;

                        rel1 {
                                relative, 0.0 0.0;
                                offset, 0 0;
                        }

                       image {
                                normal, "button1.png";
                      }
                }

        }

   } /* Close Parts */

   programs {

        program {
                name, "button_button1_pulsed1";
                signal, "mouse,down,1";
                source, "button_button1";
                action, STATE_SET "pulsed1" 0.0;
                transition, SINUSOIDAL 1.0;
                target, "button_button1";
                after,  "button_button1_pulsed2";
        }

        program {
                name, "button_button1_pulsed2";
                source, "button_button1";
                action, STATE_SET "default" 0.0;
                transition, SINUSOIDAL 1.0;
                target, "button_button1";
        }

   } /* Close Prog */
 } /* Close Group */
} /* Close Coll */

Attachment: button1.png
Description: PNG image