super simple press button with click sound and background image

Simple Button that has two state "pressed" and "unpressed" with sound on touch released.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Evas_Object* button = elm_button_add(box);
evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
char edj_path[512] = {0,};
char *resdir = app_get_resource_path();
strcat(edj_path, resdir);
strcat(edj_path, "style.edj");
elm_layout_file_set(button, edj_path, "main");
free(resdir);
elm_object_part_text_set(button, "text", "Test");
elm_box_pack_end(box, button);
evas_object_show(button);
/*
// style.edj
// be careful, png and wav files must be placed into directory written with -ID -SD options.
collections {
     images {
        image: "pause.png" COMP;
        image: "play.png" COMP;
    }
    sounds {
        sample { name: "sound" LOSSY 64;
            source: "button.wav";
        }
    }
    group { name: "main";
        parts {
            part { name: "bg";
                type: IMAGE;
                mouse_events: 1;
                description { state: "default" 0.0;
                    min: 128 128;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX