0

In EDC, I can use scripts in collections/group to make animation:

group { "my_group";
  script {
     public my_anim(val, Float:pos) {
        set_tween_state(PART:"elm.text", pos, "state_begin", 0.0, "state_end", 0.0);
     }
     public start_my_anim() {
        anim(1 /*duration in seconds*/, "my_anim", 1 /*I have no idea about this param*/);
     }
  }

  parts {
     text { "elm.text";
        desc { "state_begin";
           ...           
        }            
        desc { "state_end";
           ...
        }            
     }    
  }
}

If I call start_my_anim, it will animate my text, great!

But it will animate with LINEAR transition. How can I ask anim to use DECELERATE?

Daniel
  • 2,318
  • 2
  • 22
  • 53

1 Answers1

1

You can use set_tween_state_anim() instead of set_tween_state() as follows.

set_tween_state_anim(PART:"elm.text", "state_begin", 0.0, "state_end", 0.0, DECELERATE, pos);
//There are some transition modes. (e.g. LINEAR, ACCELERATE, DECELERATE, etc.)

BTW, the last parameter of anim() is passed as the value parameter of the script function.

public my_anim(val, Float:pos) {
    if (val == 9) { // This is the last parameter of anim function.
        set_tween_state(PART:"elm.text", pos, "state_begin", 0.0, "state_end", 0.0);
    }
}
public start_my_anim() {
    anim(1, "my_anim", 9); // The last parameter is passed as the value parameter of the script function.
}

Thank you.

Dev JJ
  • 46
  • 1
  • Perfect, thank you. I didn't give a chance to `set_tween_state_anim` earlier, as my EDC Editor is not coloring it to green, just like it does for `set_tween_state`. – Daniel Jan 14 '21 at 06:56
  • By any chance can you share a list of available commands please? – Daniel Jan 14 '21 at 06:59
  • 1
    I checks commands in the following file. https://git.enlightenment.org/core/efl.git/tree/data/edje/include/edje.inc But some of commands are not supported by Tizen. – Dev JJ Jan 15 '21 at 10:14
  • Can you please look at my other Tizen issue with SVG: https://stackoverflow.com/questions/65939893/svg-is-not-displayed-after-migrating-from-tizen4-to-tizen5-5-neither-in-emulato Sorry for asking this here, but there is no available forum where I can get in touch. JIRA is not working, facebook is handled by a bot. forum is not sending email – Daniel Jan 29 '21 at 06:01