summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2012-10-08 22:47:19 +0000
committerBruno Dilly <bdilly@profusion.mobi>2012-10-08 22:47:19 +0000
commit18433ec343dc9f684c201265d4c97ae730586a92 (patch)
tree626b8fb39f5de93ae4ad8ed00eecfadbc3a17ca8 /legacy
parent1d5fbc9850f4b5a9543a21e3fec38814ee43e823 (diff)
ephysics: fix sandbox material callback
SVN revision: 77597
Diffstat (limited to 'legacy')
-rw-r--r--legacy/ephysics/data/themes/sandbox_misc.edc16
-rw-r--r--legacy/ephysics/src/bin/ephysics_sandbox.c20
2 files changed, 19 insertions, 17 deletions
diff --git a/legacy/ephysics/data/themes/sandbox_misc.edc b/legacy/ephysics/data/themes/sandbox_misc.edc
index b4795dd087..8aa7ac2943 100644
--- a/legacy/ephysics/data/themes/sandbox_misc.edc
+++ b/legacy/ephysics/data/themes/sandbox_misc.edc
@@ -60,7 +60,7 @@
60 } 60 }
61 61
62 group { 62 group {
63 name: "0"; 63 name: "Custom";
64 parts { 64 parts {
65 part { 65 part {
66 name: "ball"; 66 name: "ball";
@@ -73,9 +73,9 @@
73 } 73 }
74 } 74 }
75 } 75 }
76 76
77 group { 77 group {
78 name: "1"; 78 name: "Concrete";
79 parts { 79 parts {
80 part { 80 part {
81 name: "ball"; 81 name: "ball";
@@ -90,7 +90,7 @@
90 } 90 }
91 91
92 group { 92 group {
93 name: "2"; 93 name: "Iron";
94 parts { 94 parts {
95 part { 95 part {
96 name: "ball"; 96 name: "ball";
@@ -105,7 +105,7 @@
105 } 105 }
106 106
107 group { 107 group {
108 name: "3"; 108 name: "Plastic";
109 parts { 109 parts {
110 part { 110 part {
111 name: "ball"; 111 name: "ball";
@@ -120,7 +120,7 @@
120 } 120 }
121 121
122 group { 122 group {
123 name: "4"; 123 name: "Polystyrene";
124 parts { 124 parts {
125 part { 125 part {
126 name: "ball"; 126 name: "ball";
@@ -135,7 +135,7 @@
135 } 135 }
136 136
137 group { 137 group {
138 name: "5"; 138 name: "Rubber";
139 parts { 139 parts {
140 part { 140 part {
141 name: "ball"; 141 name: "ball";
@@ -150,7 +150,7 @@
150 } 150 }
151 151
152 group { 152 group {
153 name: "6"; 153 name: "Wood";
154 parts { 154 parts {
155 part { 155 part {
156 name: "ball"; 156 name: "ball";
diff --git a/legacy/ephysics/src/bin/ephysics_sandbox.c b/legacy/ephysics/src/bin/ephysics_sandbox.c
index ae91eba2b5..9cebf74861 100644
--- a/legacy/ephysics/src/bin/ephysics_sandbox.c
+++ b/legacy/ephysics/src/bin/ephysics_sandbox.c
@@ -132,7 +132,9 @@ static void
132_body_material_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__) 132_body_material_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
133{ 133{
134 EPhysics_Body *body = data; 134 EPhysics_Body *body = data;
135 //Evas_Object *body_image; 135 Evas_Object *body_image;
136 const char *material;
137 int x, y, w, h;
136 138
137 ephysics_body_material_set(body, elm_spinner_value_get(obj)); 139 ephysics_body_material_set(body, elm_spinner_value_get(obj));
138 140
@@ -142,19 +144,19 @@ _body_material_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
142 ephysics_body_friction_get(body)); 144 ephysics_body_friction_get(body));
143 elm_spinner_value_set(evas_object_data_get(obj, "restitution"), 145 elm_spinner_value_set(evas_object_data_get(obj, "restitution"),
144 ephysics_body_restitution_get(body)); 146 ephysics_body_restitution_get(body));
145/*
146 147
147 img_name = elm_spinner_value_get(obj); //name if its possible 148 body_image = ephysics_body_evas_object_unset(body);
148 evas_object_del(ephysics_body_evas_object_unset(body)); 149 evas_object_geometry_get(body_image, &x, &y, &w, &h);
150 evas_object_del(body_image);
149 151
152 material = elm_spinner_special_value_get(obj, elm_spinner_value_get(obj));
150 body_image = elm_image_add(evas_object_data_get(obj, "win")); 153 body_image = elm_image_add(evas_object_data_get(obj, "win"));
151 elm_image_file_set( 154 elm_image_file_set(
152 body_image, PACKAGE_DATA_DIR "/" SANDBOX_THEME ".edj", img_name); 155 body_image, PACKAGE_DATA_DIR "/" SANDBOX_THEME ".edj", material);
153 evas_object_resize(body_image, 70, 70); 156 evas_object_resize(body_image, w, h);
154 evas_object_move(body_image, 150, 150);//FIX! 157 evas_object_move(body_image, x, y);
155 evas_object_show(body_image); 158 evas_object_show(body_image);
156 ephysics_body_evas_object_set(body, body_image, EINA_TRUE); 159 ephysics_body_evas_object_set(body, body_image, EINA_FALSE);
157*/
158} 160}
159 161
160static void 162static void