ephysics: use macro for balls groups on sandbox theme

SVN revision: 77673
This commit is contained in:
Bruno Dilly 2012-10-09 19:59:25 +00:00
parent 02d551e3a9
commit 9a5f9bc6d5
1 changed files with 25 additions and 111 deletions

View File

@ -1,13 +1,3 @@
images {
image: "ball-red70.png" COMP;
image: "ball-concrete.png" COMP;
image: "ball-iron.png" COMP;
image: "ball-plastic.png" COMP;
image: "ball-polystyrene.png" COMP;
image: "ball-rubber.png" COMP;
image: "ball-wood.png" COMP;
}
group { group {
name: "sandbox"; name: "sandbox";
min: 1280 720; min: 1280 720;
@ -59,107 +49,31 @@
} }
} }
group { #define SANDBOX_BALL_ADD(_name, _img) \
name: "Custom"; images { \
parts { image: #_img##".png" COMP; \
part { } \
name: "ball"; group { \
mouse_events: 0; name: #_name; \
type: IMAGE; parts { \
description { part { \
state: "default" 0.0; name: "ball"; \
image.normal: "ball-red70.png"; mouse_events: 0; \
} type: IMAGE; \
} description { \
} state: "default" 0.0; \
image.normal: #_img##".png"; \
} \
} \
} \
} }
group { SANDBOX_BALL_ADD(Custom, ball-red70)
name: "Concrete"; SANDBOX_BALL_ADD(Concrete, ball-concrete)
parts { SANDBOX_BALL_ADD(Iron, ball-iron)
part { SANDBOX_BALL_ADD(Plastic, ball-plastic)
name: "ball"; SANDBOX_BALL_ADD(Polystyrene, ball-polystyrene)
mouse_events: 0; SANDBOX_BALL_ADD(Rubber, ball-rubber)
type: IMAGE; SANDBOX_BALL_ADD(Wood, ball-wood)
description {
state: "default" 0.0;
image.normal: "ball-concrete.png";
}
}
}
}
group { #undef SANDBOX_BALL_ADD
name: "Iron";
parts {
part {
name: "ball";
mouse_events: 0;
type: IMAGE;
description {
state: "default" 0.0;
image.normal: "ball-iron.png";
}
}
}
}
group {
name: "Plastic";
parts {
part {
name: "ball";
mouse_events: 0;
type: IMAGE;
description {
state: "default" 0.0;
image.normal: "ball-plastic.png";
}
}
}
}
group {
name: "Polystyrene";
parts {
part {
name: "ball";
mouse_events: 0;
type: IMAGE;
description {
state: "default" 0.0;
image.normal: "ball-polystyrene.png";
}
}
}
}
group {
name: "Rubber";
parts {
part {
name: "ball";
mouse_events: 0;
type: IMAGE;
description {
state: "default" 0.0;
image.normal: "ball-rubber.png";
}
}
}
}
group {
name: "Wood";
parts {
part {
name: "ball";
mouse_events: 0;
type: IMAGE;
description {
state: "default" 0.0;
image.normal: "ball-wood.png";
}
}
}
}