On Sat, Apr 23, 2016 at 11:29 AM Hermet Park <[email protected]> wrote:

> hermet pushed a commit to branch master.
>
>
> http://git.enlightenment.org/games/etypers.git/commit/?id=1214e31cf62746c3945d3cf617ab748d3974eaf2
>
> commit 1214e31cf62746c3945d3cf617ab748d3974eaf2
> Author: Hermet Park <[email protected]>
> Date:   Sun Apr 24 00:28:24 2016 +0900
>
>     theme: apply lazy edc
> ---
>  data/theme/etypers.edc | 210
> +++++++++++++++++++++++--------------------------
>  1 file changed, 97 insertions(+), 113 deletions(-)
>
> diff --git a/data/theme/etypers.edc b/data/theme/etypers.edc
> index 3c86424..fe3db82 100644
> --- a/data/theme/etypers.edc
> +++ b/data/theme/etypers.edc
> @@ -5,23 +5,21 @@ collections {
>        image: "clouds.png" COMP;
>        image: "input_bg.png" COMP;
>     }
> -   group { name: "gui";
> +   group { "gui";
>        parts {
> -         part { name: "bg";
> -            type: IMAGE;
> -            description { state: "default" 0.0;
> +         image { "bg";
> +            desc { "default";
>                 image.normal: "bg.jpg";
>              }
>           }
> -         part { name: "sky";
> -            type: IMAGE;
> -            description { state: "default" 0.0;
> +         image { "sky";
> +            desc { "default";
>                 image.normal: "sky.jpg";
>                 aspect: 2.6225 2.6225;
>                 color: 170 170 170 170;
>              }
> -            description { state: "drift" 0.0;
> -               inherit: "default" 0.0;
> +            desc { "drift";
> +               inherit: "default";
>

You can just do `inherit;` when inheriting the default state.


>                 fill {
>                    origin {
>                       relative: 1.0 0.0;
> @@ -29,14 +27,12 @@ collections {
>                 }
>              }
>           }
> -         part { name: "enemies";
> -            type: SWALLOW;
> -            description { state: "default" 0.0;
> +         swallow { "enemies";
> +            desc { "default";
>

When declaring the default state, the name can be omitted if the part
itself has not been inherited.


>              }
>           }
> -         part { name: "clouds";
> -            type: IMAGE;
> -            description { state: "default" 0.0;
> +         image { "clouds";
> +            desc { "default";
>                 image.normal: "clouds.png";
>                 fill {
>                    origin {
> @@ -47,8 +43,8 @@ collections {
>                    }
>                 }
>              }
> -            description { state: "drift" 0.0;
> -               inherit: "default" 0.0;
> +            desc { "drift";
> +               inherit: "default";
>                 fill {
>                    origin {
>                       relative: 1.847220 0.0;
> @@ -59,23 +55,21 @@ collections {
>                 }
>              }
>           }
> -         part { name: "defense_wall";
> -            type: SWALLOW;
> -            description { state: "default" 0.0;
> +         swallow { "defense_wall";
> +            desc { "default";
>                 rel1.relative: 0.0 0.95;
>                 rel2.relative: 1.0 1.0;
>              }
>           }
> -         part { name: "score";
> -            type: TEXT;
> +         text { "score";
>              scale: 1;
>

`scale: 1;` can become `scale;` and `scale: 0;` can become `noscale;`


> -            description { state: "default" 0.0;
> +            desc { "default";
>                 text { font: "Sans:style=Bold";
> -                   size: 10;
> -                   min: 0 0;
> -                   max: 1 0;
> -                   align: 0 0;
> -                   text: "Score:";
> +                  size: 10;
> +                  min: 0 0;
> +                  max: 1 0;
> +                  align: 0 0;
> +                  text: "Score:";
>                 }
>                 color: 50 50 50 200;
>                 align: 0 0;
> @@ -84,16 +78,15 @@ collections {
>                 rel2.relative: 1 0;
>              }
>           }
> -         part { name: "score_value";
> -            type: TEXT;
> +         text { "score_value";
>              scale: 1;
> -            description { state: "default" 0.0;
> +            desc { "default";
>                 text { font: "Sans:style=Bold";
> -                   size: 10;
> -                   min: 0 0;
> -                   max: 1 0;
> -                   align: 0 0;
> -                   text: "0";
> +                  size: 10;
> +                  min: 0 0;
> +                  max: 1 0;
> +                  align: 0 0;
> +                  text: "0";
>                 }
>                 color: 200 200 200 200;
>                 align: 0 0;
> @@ -102,16 +95,15 @@ collections {
>                 rel1.relative: 1 0;
>              }
>           }
> -         part { name: "level";
> -            type: TEXT;
> +         text { "level";
>              scale: 1;
> -            description { state: "default" 0.0;
> +            desc { "default";
>                 text { font: "Sans:style=Bold";
> -                   size: 10;
> -                   min: 0 0;
> -                   max: 1 0;
> -                   align: 0 0;
> -                   text: "Level:";
> +                  size: 10;
> +                  min: 0 0;
> +                  max: 1 0;
> +                  align: 0 0;
> +                  text: "Level:";
>                 }
>                 color: 50 50 50 200;
>                 align: 0 0;
> @@ -122,16 +114,15 @@ collections {
>                 rel2.relative: 1 0;
>              }
>           }
> -         part { name: "level_value";
> -            type: TEXT;
> +         text { "level_value";
>              scale: 1;
> -            description { state: "default" 0.0;
> +            desc { "default";
>                 text { font: "Sans:style=Bold";
> -                   size: 10;
> -                   min: 0 0;
> -                   max: 1 0;
> -                   align: 0 0;
> -                   text: "1";
> +                  size: 10;
> +                  min: 0 0;
> +                  max: 1 0;
> +                  align: 0 0;
> +                  text: "1";
>                 }
>                 color: 200 200 200 200;
>                 align: 0 0 ;
> @@ -140,16 +131,15 @@ collections {
>                 rel1.to: "level";
>              }
>           }
> -         part { name: "accuracy";
> -            type: TEXT;
> +         text { "accuracy";
>              scale: 1;
> -            description { state: "default" 0.0;
> +            desc { "default";
>                 text { font: "Sans:style=Bold";
> -                   size: 10;
> -                   min: 0 0;
> -                   max: 1 0;
> -                   align: 0 0;
> -                   text: "Accuracy:";
> +                  size: 10;
> +                  min: 0 0;
> +                  max: 1 0;
> +                  align: 0 0;
> +                  text: "Accuracy:";
>                 }
>                 color: 50 50 50 200;
>                 align: 0 0;
> @@ -157,16 +147,15 @@ collections {
>                 rel1.relative: 0 1;
>              }
>           }
> -         part { name: "accuracy_value";
> -            type: TEXT;
> +         text { "accuracy_value";
>              scale: 1;
> -            description { state: "default" 0.0;
> +            desc { "default";
>                 text { font: "Sans:style=Bold";
> -                   size: 10;
> -                   min: 0 0;
> -                   max: 1 0;
> -                   align: 0 0;
> -                   text: "100%";
> +                  size: 10;
> +                  min: 0 0;
> +                  max: 1 0;
> +                  align: 0 0;
> +                  text: "100%";
>                 }
>                 color: 200 200 200 200;
>                 align: 0 0 ;
> @@ -175,10 +164,9 @@ collections {
>                 rel1.to: "accuracy";
>              }
>           }
> -         part { name: "input_clipper";
> -            type: RECT;
> +         rect { "input_clipper";
>              scale: 1;
> -            description { state: "default" 0.0;
> +            desc { "default";
>                 align: 0.5 1;
>                 min: 120 30;
>                 max: 120 30;
> @@ -187,9 +175,8 @@ collections {
>                 rel2.relative: 0.5 0.95;
>              }
>           }
> -         part { name: "input_bg";
> -            type: IMAGE;
> -            description { state: "default" 0.0;
> +         image { "input_bg";
> +            desc { "default";
>                 rel1.to: "input_clipper";
>                 rel2.to: "input_clipper";
>

Cases where rel1.to and rel2.to have the same value can be simplified into
a single `rel.to PART` statement.


>                 fixed: 1 1;
> @@ -198,46 +185,43 @@ collections {
>                 }
>                 color: 130 130 130 130;
>              }
> -        }
> -        part { name: "entry";
> -            type: SWALLOW;
> +         }
> +         swallow { "entry";
>              clip_to: "input_clipper";
>

`clip_to` can be shortened to just `clip`


> -            description { state: "default" 0.0;
> +            desc { "default";
>                 rel1.to: "input_clipper";
>                 rel2.to: "input_clipper";
>                 align: 0.5 0.5;
>                 fixed: 1 1;
>              }
>           }
> -         part { name: "effect_overlay";
> -            type: RECT;
> +         rect { "effect_overlay";
>              mouse_events: 0;
> -            description { state: "default" 0.0;
> +            desc { "default";
>                 color: 0 0 0 0;
>              }
> -            description { state: "hit" 0.0;
> +            desc { "hit";
>                 color: 200 0 0 200;
>              }
> -            description { state: "gameover" 0.0;
> +            desc { "gameover";
>                 color: 255 255 255 255;
>

255 255 255 255 is the default color, so this could become just `desc {
"gameover"; }`


>              }
>           }
> -         part { name: "gameover";
> -            type: TEXT;
> +         text { "gameover";
>              scale: 1;
> -            description { state: "default" 0.0;
> +            desc { "default";
>                 text { font: "Sans:style=Bold";
> -                   size: 30;
> -                   min: 0 0;
> -                   max: 1 0;
> -                   align: 0.5 0.4;
> -                   text: "Game Over";
> +                  size: 30;
> +                  min: 0 0;
> +                  max: 1 0;
> +                  align: 0.5 0.4;
> +                  text: "Game Over";
>                 }
>                 color: 0 0 0 0;
>                 align: 0.5 0.5;
>

0.5 0.5 is the default value


>              }
> -            description { state: "gameover" 0.0;
> -               inherit: "default" 0.0;
> +            desc { "gameover";
> +               inherit: "default";
>                 color: 100 100 100 255;
>              }
>           }
> @@ -256,7 +240,7 @@ collections {
>                 align: 0.5 0.5;
>              }
>              desc { "gameover";
> -               inherit: "default" 0.0;
> +               inherit: "default";
>                 color: 100 100 100 255;
>              }
>           }
> @@ -275,67 +259,67 @@ collections {
>                 align: 0.5 0.6;
>              }
>              desc { "gameover";
> -               inherit: "default" 0.0;
> +               inherit: "default";
>                 color: 100 100 100 255;
>              }
>           }
>        }
>        programs {
> -         program { name: "sky_anim1";
> +         program { "sky_anim1";
>              signal: "load";
> -            action: STATE_SET "drift" 0.0;
> +            action: STATE_SET "drift";
>              transition: "LINEAR" 30.0;
>              target: "sky";
>              after: "sky_anim2";
>

You could use a sequence {} block here instead of having a separate
"sky_anim2" program.


>           }
> -         program { name: "sky_anim2";
> -            action: STATE_SET "default" 0.0;
> +         program { "sky_anim2";
> +            action: STATE_SET "default";
>              target: "sky";
>              after: "sky_anim1";
>           }
> -         program { name: "clouds_anim1";
> +         program { "clouds_anim1";
>              signal: "load";
> -            action: STATE_SET "drift" 0.0;
> +            action: STATE_SET "drift";
>              transition: "LINEAR" 10.0;
>              target: "clouds";
>              after: "clouds_anim2";
>           }
> -         program { name: "clouds_anim2";
> -            action: STATE_SET "default" 0.0;
> +         program { "clouds_anim2";
> +            action: STATE_SET "default";
>              target: "clouds";
>              after: "clouds_anim1";
>           }
> -         program { name: "hit";
> +         program { "hit";
>              signal: "elm,state,hit";
>              source: "etypers";
> -            action: STATE_SET "hit" 0.0;
> +            action: STATE_SET "hit";
>              target: "effect_overlay";
>              after: "hit2";
>           }
> -         program { name: "hit2";
> -            action: STATE_SET "default" 0.0;
> +         program { "hit2";
> +            action: STATE_SET "default";
>              target: "effect_overlay";
>              transition: DECELERATE 1;
>           }
> -         program { name: "gameover";
> +         program { "gameover";
>              signal: "elm,state,gameover";
>              source: "etypers";
> -            action: STATE_SET "hit" 0.0;
> +            action: STATE_SET "hit";
>              target: "effect_overlay";
>              after: "gameover2";
>           }
> -         program { name: "gameover2";
> -            action: STATE_SET "gameover" 0.0;
> +         program { "gameover2";
> +            action: STATE_SET "gameover";
>              target: "effect_overlay";
>              target: "gameover";
>              target: "total_score";
>              target: "exit_guide";
>              transition: LINEAR 1.0;
>           }
> -         program { name: "gamereset";
> +         program { "gamereset";
>              signal: "elm,state,gamereset";
>              source: "etypers";
> -            action: STATE_SET "default" 0.0;
> +            action: STATE_SET "default";
>              target: "effect_overlay";
>              target: "effect_overlay";
>              target: "gameover";
>
> --
>
>
>
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to