Customizable parts in EDC files
This snippet shows how to define customizable parts in EDC files. It makes creating multiple similar parts much faster and improves code readability.
12345678910111213141516171819202122232425262728293031323334353637#define BUTTON_SIZE 60;#define LETTER_BUTTON(letter, index, rel_to) \part { \name: "button_"letter; \type: EXTERNAL; \source: "elm/button"; \description { \state: "default" 0; \align: 0 0; \rel1 { \offset: (BUTTON_SIZE*index) 0; \to: rel_to; \} \rel2 { \offset: (BUTTON_SIZE*index) 0; \to: rel_to; \} \params { \string: "label" letter; \} \} \} \collections {group { name: "main";parts {part { name: "button_A";type: EXTERNAL;source: "elm/button";description { state: "default" 0;align: 0 0;rel1 {relative: 0.5 0.5;offset: (-3*BUTTON_SIZE) 0;}rel2 {