summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrappist <trappist@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-13 20:25:04 +0000
committertrappist <trappist@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-13 20:25:04 +0000
commit633b527f3d3f595d4b257723115e2396050ea2a1 (patch)
tree29d373cba7e67152cd7cd7fc4949c55fd3b64c6f
parent29a101999964cf880ba30d67345f11500f732a33 (diff)
downloadmarex-dev-633b527f3d3f595d4b257723115e2396050ea2a1.tar.gz
marex-dev-633b527f3d3f595d4b257723115e2396050ea2a1.tar.bz2
Add depth option to explode3d
git-svn-id: file:///beryl/trunk@4040 d7aaf104-2d23-0410-ae22-9d23157bf5a3
-rw-r--r--beryl-plugins/src/animation.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/beryl-plugins/src/animation.c b/beryl-plugins/src/animation.c
index 981f6ef..830c29b 100644
--- a/beryl-plugins/src/animation.c
+++ b/beryl-plugins/src/animation.c
@@ -540,6 +540,9 @@ static char *animDirectionName[] = {
#define ANIM_FIRE_DIRECTION_DEFAULT AnimDirectionDown
#define ANIM_DOMINO_DIRECTION_DEFAULT AnimDirectionAuto
#define ANIM_RAZR_DIRECTION_DEFAULT AnimDirectionAuto
+#define ANIM_EXPLODE3D_DEPTH_DEFAULT 15.0
+#define ANIM_EXPLODE3D_DEPTH_MIN 0.0
+#define ANIM_EXPLODE3D_DEPTH_MAX 50.0
typedef enum
{
@@ -888,6 +891,7 @@ static char *allEffectName[] = {
N_("Domino (3D)"),
N_("Dream"),
N_("Explode (3D)"),
+ N_("Explode (Glass)"),
N_("Fade"),
N_("Glide 1 (3D)"),
N_("Glide 2 (3D)"),
@@ -950,6 +954,7 @@ static char *minimizeEffectName[] = {
N_("Domino (3D)"),
N_("Dream"),
N_("Explode (3D)"),
+ N_("Explode (Glass)"),
N_("Fade"),
N_("Glide 1 (3D)"),
N_("Glide 2 (3D)"),
@@ -996,6 +1001,7 @@ static char *closeEffectName[] = {
N_("Domino (3D)"),
N_("Dream"),
N_("Explode (3D)"),
+ N_("Explode (Glass)"),
N_("Fade"),
N_("Glide 1 (3D)"),
N_("Glide 2 (3D)"),
@@ -1176,6 +1182,7 @@ typedef enum
ANIM_SCREEN_OPTION_CURVED_FOLD_AMP,
ANIM_SCREEN_OPTION_DOMINO_DIRECTION,
ANIM_SCREEN_OPTION_RAZR_DIRECTION,
+ ANIM_SCREEN_OPTION_EXPLODE3D_DEPTH,
ANIM_SCREEN_OPTION_FIRE_PARTICLES,
ANIM_SCREEN_OPTION_FIRE_SIZE,
ANIM_SCREEN_OPTION_FIRE_SLOWDOWN,
@@ -4991,8 +4998,9 @@ static void polygonsPostPaintWindow(CompScreen * s, CompWindow * w)
static void fxExplode3DInit(CompScreen * s, CompWindow * w)
{
ANIM_WINDOW(w);
-
- if (!tessellateIntoRectangles(w, 20, 14, 15.0f))
+ ANIM_SCREEN(s);
+ if (!tessellateIntoRectangles(w, 20, 14,
+ as->opt[ANIM_SCREEN_OPTION_EXPLODE3D_DEPTH].value.f))
return;
PolygonSet *pset = aw->polygonSet;
@@ -6113,6 +6121,12 @@ animSetScreenOption(CompScreen * screen, char *name, CompOptionValue * value)
return TRUE;
}
break;
+ case ANIM_SCREEN_OPTION_EXPLODE3D_DEPTH:
+ if (compSetFloatOption(o, value))
+ {
+ return TRUE;
+ }
+ break;
case ANIM_SCREEN_OPTION_GLIDE1_AWAY_POS:
if (compSetFloatOption(o, value))
{
@@ -7443,6 +7457,20 @@ static void animScreenInitOptions(AnimScreen * as)
o->rest.s.string = animDirectionName;
o->rest.s.nString = LIST_SIZE(animDirectionName);
+ // Explode3d
+ o = &as->opt[ANIM_SCREEN_OPTION_EXPLODE3D_DEPTH];
+ o->name = "explode_depth";
+ o->group = N_("Explode");
+ o->subGroup = N_("");
+ o->advanced = False;
+ o->shortDesc = N_("Depth of exploded polygons");
+ o->longDesc = N_("Depth of exploded window pieces. Set to 0 for a shattering glass effect.");
+ o->displayHints = "";
+ o->type = CompOptionTypeFloat;
+ o->value.f = ANIM_EXPLODE3D_DEPTH_DEFAULT;
+ o->rest.f.min = ANIM_EXPLODE3D_DEPTH_MIN;
+ o->rest.f.max = ANIM_EXPLODE3D_DEPTH_MAX;
+
// Glide 1
o = &as->opt[ANIM_SCREEN_OPTION_GLIDE1_AWAY_POS];