On Tue, 9 Aug 2011 01:48:49 -0700 "Drucker, Benjamin T" <[email protected]> said:
you'll need: 1. a custom state for some "centering" part (really just an invisible rectangle you place somewhere to make your explosion relative to it). 2. you'll need embryo script to get the data you need and munge it. see attached. go find the edje.inc file... it'll list all the api calls u have to call from embryo script. embryo script (the lang) is actually small/pawn - its very c-like. if you look at elementary and e17 default themes you'll see its used wherever you see script sections. that's about the best examples you'll find and other than that it's "use your imagination and the edje.inc reference". there's ALSO a default.inc provided by the embryo core lib itself. its very minimal but gives access to varargs (used for things like message passing between process and edje for more complex/formalized data than simple 2 string signal+source), it also defines the standard basic math and floating point extensions (sin(), cos() and friends) and some basic string functions and globbing as well as getting time, date and random numbers... embryo is even evil enough to allow operator overloading. not too bad for a tiny little lang whose entire runtime vm is 2k lines of c and all the above extensions drag it up to about 3k. > I am attempting to learn edje edc by find example programs and fiddling with > them. Right now I am trying to determine where a mouse click is in a RECT > and place an image there. I don't NEED to do it all in edje edc, but I > wanted to see if it's possible. I started with a program by Jonathan Atton > (watchwolf [at] fr). > > from https://gitorious.org/btdrucke/explode/trees/master, this is my > relatively small edc file. I want to find the mouse click coordinates and > use them to change the offset of the "expxlode1" image. > > Any thoughts? Thanks! > > Ben > ----------------- > > collections { > group { > name: "explode"; > min: 500 500; > max: 500 500; > > images { > image: "explode1_1.png" COMP; > image: "explode1_2.png" COMP; > image: "explode1_3.png" COMP; > image: "explode1_4.png" COMP; > image: "explode1_5.png" COMP; > image: "explode1_6.png" COMP; > image: "explode1_7.png" COMP; > image: "explode1_8.png" COMP; > } > parts { > part { > name: "background"; > type: RECT; > mouse_events: 1; > description { > state: "default" 0.0; > color: 40 0 0 255; > } > } > part { > name: "explode1"; > type: IMAGE; > mouse_events: 1; > scale: 0; > description { > state: "default" 0.0; > //the part is not visible > visible: 0; > //aspect: 1.0 1.0; > min: 50 50; > max: 50 50; > rel1 { > relative: -1.0 -1.0; > to: background; > offset: 0 0; > } > //the animation start and end with the image "normal" > //in our case this image is empty. > image { > tween: "explode1_1.png"; > tween: "explode1_2.png"; > tween: "explode1_3.png"; > tween: "explode1_4.png"; > tween: "explode1_5.png"; > tween: "explode1_6.png"; > tween: "explode1_7.png"; > normal: "explode1_8.png"; > } > } > description { > //the part is visible > state: "explode" 0.0; > inherit: "default" 0.0; > visible: 1; > color: 255 255 255 255; > } > } > } > > program { > name: "position_explode"; > source, "background"; > signal, "mouse,clicked,1"; > //action: PARAM_SET "explode1" ??? > after: "start_explode"; > } > > program { > name: "start_explode"; > action: STATE_SET "explode" 0.0; > transition: LINEAR 0.5; > target: "explode1"; > after: "end_explode"; > } > program { > name: "end_explode"; > action: STATE_SET "default" 0.0; > target: "explode1"; > } > } > } > > > ------------------------------------------------------------------------------ > uberSVN's rich system and user administration capabilities and model > configuration take the hassle out of deploying and managing Subversion and > the tools developers use with it. Learn more about uberSVN and get a free > download at: http://p.sf.net/sfu/wandisco-dev2dev > _______________________________________________ > enlightenment-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) [email protected]
explode.edc
Description: Binary data
------------------------------------------------------------------------------ FREE DOWNLOAD - uberSVN with Social Coding for Subversion. Subversion made easy with a complete admin console. Easy to use, easy to manage, easy to install, easy to extend. Get a Free download of the new open ALM Subversion platform now. http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
