diff --git a/legacy/edje/configure.ac b/legacy/edje/configure.ac index f3179acbb6..2b193b054d 100644 --- a/legacy/edje/configure.ac +++ b/legacy/edje/configure.ac @@ -346,6 +346,7 @@ fi if test "x${want_ephysics}" = "xyes" -a "x${have_ephysics}" = "xno"; then AC_MSG_ERROR([EPhysics required, but not found]) fi +AM_CONDITIONAL([ENABLE_EPHYSICS], [test "x${have_ephysics}" != "xno"]) # Enable Multisense use diff --git a/legacy/edje/src/examples/Makefile.am b/legacy/edje/src/examples/Makefile.am index 7ad48bf5aa..3f120893c0 100644 --- a/legacy/edje/src/examples/Makefile.am +++ b/legacy/edje/src/examples/Makefile.am @@ -52,6 +52,10 @@ if ENABLE_MULTISENSE EDCS += multisense.edc endif +if ENABLE_EPHYSICS +EDCS += physics_basic.edc +endif + .edc.edj: $(EDJE_CC) $(EDJE_CC_FLAGS) $(SND_DIR) $< $(builddir)/$(@F) diff --git a/legacy/edje/src/examples/physics_basic.edc b/legacy/edje/src/examples/physics_basic.edc new file mode 100644 index 0000000000..cc98fdc170 --- /dev/null +++ b/legacy/edje/src/examples/physics_basic.edc @@ -0,0 +1,64 @@ +collections { + + images { + image: "bubble-blue.png" COMP; + } + + group { + name: "example_group"; + min: 100 100; + + parts { + part { + name: "background"; + type: RECT; + physics_body: NONE; + description { + state: "default" 0.0; + color: 255 255 255 255; /* white */ + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 1.0; + } + } + + part { + name: "red_box"; + type: RECT; + physics_body: RIGID_BOX; + description { + state: "default" 0.0; + color: 255 0 0 255; /* red */ + rel1.relative: 0.55 0.1; + rel2.relative: 0.75 0.3; + aspect: 1 1; + } + } + + part { + name: "blue_circle"; + type: IMAGE; + physics_body: RIGID_CIRCLE; + description { + state: "default" 0.0; + rel1.relative: 0.25 0.1; + rel2.relative: 0.45 0.3; + aspect: 1 1; + image { + normal: "bubble-blue.png"; + } + } + } + + part { + name: "floor"; + type: RECT; + physics_body: BOUNDARY_BOTTOM; + description { + state: "default" 0.0; + visible: 0; + } + } + } + + } +}