diff --git a/legacy/ephysics/data/themes/balls.edc b/legacy/ephysics/data/themes/balls.edc index 957c1c4a32..c23965fa76 100644 --- a/legacy/ephysics/data/themes/balls.edc +++ b/legacy/ephysics/data/themes/balls.edc @@ -1,124 +1,27 @@ - images { - image: "ball-blue.png" COMP; - image: "ball-blue70.png" COMP; - image: "ball-green.png" COMP; - image: "ball-green70.png" COMP; - image: "ball-red.png" COMP; - image: "ball-red70.png" COMP; - } - - group { - name: "blue-ball"; - - parts { - - part { - name: "ball"; - mouse_events: 0; - type: IMAGE; - description { - state: "default" 0.0; - image.normal: "ball-blue.png"; - } - } - - } - - } - - group { - name: "big-blue-ball"; - - parts { - - part { - name: "ball"; - mouse_events: 0; - type: IMAGE; - description { - state: "default" 0.0; - image.normal: "ball-blue70.png"; - } - } - - } - - } - - group { - name: "red-ball"; - - parts { - - part { - name: "ball"; - mouse_events: 0; - type: IMAGE; - description { - state: "default" 0.0; - image.normal: "ball-red.png"; - } - } - - } - - } - - group { - name: "big-red-ball"; - - parts { - - part { - name: "ball"; - mouse_events: 0; - type: IMAGE; - description { - state: "default" 0.0; - image.normal: "ball-red70.png"; - } - } - - } - - } - - group { - name: "green-ball"; - - parts { - - part { - name: "ball"; - mouse_events: 0; - type: IMAGE; - description { - state: "default" 0.0; - image.normal: "ball-green.png"; - } - } - - } - - } - - group { - name: "big-green-ball"; - - parts { - - part { - name: "ball"; - mouse_events: 0; - type: IMAGE; - description { - state: "default" 0.0; - image.normal: "ball-green70.png"; - } - } - - } - +#define ADD_CIRCLE(_group, _file) \ + images { \ + image: #_file##".png" COMP; \ + } \ + group { \ + name: #_group; \ + parts { \ + part { \ + name: "ball"; \ + mouse_events: 0; \ + type: IMAGE; \ + description { \ + state: "default" 0.0; \ + image.normal: #_file##".png"; \ + } \ + } \ + } \ } +ADD_CIRCLE(blue-ball, ball-blue) +ADD_CIRCLE(big-blue-ball, ball-blue70) +ADD_CIRCLE(red-ball, ball-red) +ADD_CIRCLE(big-red-ball, ball-red70) +ADD_CIRCLE(green-ball, ball-green) +ADD_CIRCLE(big-green-ball, ball-green70) +#undef ADD_CIRCLE diff --git a/legacy/ephysics/data/themes/cubes.edc b/legacy/ephysics/data/themes/cubes.edc index 3cc2be29bd..f5d1fb17b5 100644 --- a/legacy/ephysics/data/themes/cubes.edc +++ b/legacy/ephysics/data/themes/cubes.edc @@ -1,42 +1,24 @@ - images { - image: "cube-blue.png" COMP; - image: "cube-purple.png" COMP; +#define ADD_CUBE(_group, _file) \ + images { \ + image: #_file##".png" COMP; \ + } \ + group { \ + name: #_group; \ + parts { \ + part { \ + name: "cube"; \ + type: IMAGE; \ + mouse_events: 1; \ + repeat_events: 0; \ + description { \ + state: "default" 0.0; \ + image.normal: #_file##".png"; \ + } \ + } \ + } \ } - group { - name: "blue-cube"; +ADD_CUBE(blue-cube, cube-blue); +ADD_CUBE(purple-cube, cube-purple); - parts { - - part { - name: "cube"; - type: IMAGE; - mouse_events: 1; - repeat_events: 0; - description { - state: "default" 0.0; - image.normal: "cube-blue.png"; - } - } - - } - } - - group { - name: "purple-cube"; - - parts { - - part { - name: "cube"; - type: IMAGE; - mouse_events: 1; - repeat_events: 0; - description { - state: "default" 0.0; - image.normal: "cube-purple.png"; - } - } - - } - } +#undef ADD_CUBE