Great! I'd love it! Daniel Juyung Seo (SeoZ)
On Tue, Nov 20, 2012 at 8:17 PM, Enlightenment SVN < no-re...@enlightenment.org> wrote: > Log: > try clock with separate digit images with no overlayed tube wiring. > and now due to the change i get to flicker the digits into life and > fade them out. yay! > > > > Author: raster > Date: 2012-11-20 03:17:24 -0800 (Tue, 20 Nov 2012) > New Revision: 79468 > Trac: http://trac.enlightenment.org/e/changeset/79468 > > Added: > trunk/e/data/themes/img/digit_nm.png > Modified: > trunk/e/data/themes/Makefile.am trunk/e/data/themes/edc/clock.edc > trunk/e/data/themes/img/digit_0.png trunk/e/data/themes/img/digit_1.png > trunk/e/data/themes/img/digit_2.png trunk/e/data/themes/img/digit_3.png > trunk/e/data/themes/img/digit_4.png trunk/e/data/themes/img/digit_5.png > trunk/e/data/themes/img/digit_6.png trunk/e/data/themes/img/digit_7.png > trunk/e/data/themes/img/digit_8.png trunk/e/data/themes/img/digit_9.png > trunk/e/data/themes/img/digit_na.png trunk/e/data/themes/img/digit_pm.png > > Modified: trunk/e/data/themes/Makefile.am > =================================================================== > --- trunk/e/data/themes/Makefile.am 2012-11-20 09:59:24 UTC (rev 79467) > +++ trunk/e/data/themes/Makefile.am 2012-11-20 11:17:24 UTC (rev 79468) > @@ -164,6 +164,7 @@ > img/digit_9.png \ > img/digit_am.png \ > img/digit_na.png \ > +img/digit_nm.png \ > img/digit_pm.png \ > img/dot_pattern.png \ > img/downlight_glow.png \ > > Modified: trunk/e/data/themes/edc/clock.edc > =================================================================== > --- trunk/e/data/themes/edc/clock.edc 2012-11-20 09:59:24 UTC (rev 79467) > +++ trunk/e/data/themes/edc/clock.edc 2012-11-20 11:17:24 UTC (rev 79468) > @@ -2,6 +2,7 @@ > min: 64 16; > max: 512 128; > images.image: "digit_na.png" COMP; > + images.image: "digit_nm.png" COMP; > images.image: "digit_0.png" COMP; > images.image: "digit_1.png" COMP; > images.image: "digit_2.png" COMP; > @@ -16,22 +17,8 @@ > images.image: "digit_pm.png" COMP; > images.image: "hole_tiny.png" COMP; > script { > - public do_seconds, do_24h, do_date; > - new tick_timer; > + public do_seconds, do_24h, do_date, tick_timer; > > - valset(id, v) { > - if ((v >= 0) && (v <= 9)) { > - new buf[20]; > - snprintf(buf, 20, "%i", v); > - set_state(id, buf, 0.0); > - } else { > - set_state(id, "default", 0.0); > - } > - } > - apvalset(id, pm) { > - if (pm) set_state(id, "active", 0.0); > - else set_state(id, "default", 0.0); > - } > evalsize() { > new do24h, dosec, v[14], i, tot, mul; > new parts[] = { > @@ -49,7 +36,7 @@ > mul = 3; > } > > - for (i = 0; i < 14; i += 2) { > + for (i = 12; i < 14; i += 2) { > custom_state(parts[i], "default", 0.0); > } > v[0] = 0; v[1] = 2; v[2] = 2; v[3] = 4; // hrs > @@ -102,7 +89,23 @@ > } > clock_cb(0); > } > - > + valset(name[], v) { > + new buf[20], i; > + > + for (i = 0; i < 10; i++) { > + if (i == v) { > + snprintf(buf, 20, "show,%s-%i", name, i); > + } > + else { > + snprintf(buf, 20, "hide,%s-%i", name, i); > + } > + emit(buf, "c"); > + } > + } > + apvalset(id, pm) { > + if (pm) set_state(id, "active", 0.0); > + else set_state(id, "default", 0.0); > + } > public clock_cb(val) { > new year, month, day, yearday, weekday, hour, minute; > new Float:second; > @@ -115,8 +118,8 @@ > v = round(second); > tim = timer(1.0 - (second - v), "clock_cb", 1); > // set seconds to v > - valset(PART:"s0", v / 10); > - valset(PART:"s1", v % 10); > + valset("s0", v / 10); > + valset("s1", v % 10); > } > else { > tim = timer(60.0 - (second), "clock_cb", 1); > @@ -124,14 +127,14 @@ > set_int(tick_timer, tim); > > // set minutes to minute > - valset(PART:"m0", minute / 10); > - valset(PART:"m1", minute % 10); > + valset("m0", minute / 10); > + valset("m1", minute % 10); > > // set hours to hour > do24h = get_int(do_24h); > if (do24h) { > - valset(PART:"h0", hour / 10); > - valset(PART:"h1", hour % 10); > + valset("h0", hour / 10); > + valset("h1", hour % 10); > } > else { > new pm; > @@ -147,8 +150,8 @@ > // make after midnight be 12:XX AM :) > if (hour == 0) hour = 12; > } > - valset(PART:"h0", hour / 10); > - valset(PART:"h1", hour % 10); > + valset("h0", hour / 10); > + valset("h1", hour % 10); > apvalset(PART:"ap", pm); > } > } > @@ -298,43 +301,60 @@ > image.normal: "hole_tiny.png"; > } > } > -#define DIGIT(_NAME, _TO) \ > +#define ELEM(_NAME, _TO, _DIGIT) \ > part { name: _NAME; \ > description { state: "default" 0.0; \ > rel1.to: _TO; rel2.to: _TO; \ > aspect: (52/72) (52/72); aspect_preference: BOTH; \ > - image.normal: "digit_na.png"; \ > + image.normal: "digit_"_DIGIT".png"; \ > + visible: 0; \ > + color: 255 255 255 0; \ > } \ > - description { state: "0" 0.0; inherit: "default" 0.0; image.normal: > "digit_0.png"; } \ > - description { state: "1" 0.0; inherit: "default" 0.0; image.normal: > "digit_1.png"; } \ > - description { state: "2" 0.0; inherit: "default" 0.0; image.normal: > "digit_2.png"; } \ > - description { state: "3" 0.0; inherit: "default" 0.0; image.normal: > "digit_3.png"; } \ > - description { state: "4" 0.0; inherit: "default" 0.0; image.normal: > "digit_4.png"; } \ > - description { state: "5" 0.0; inherit: "default" 0.0; image.normal: > "digit_5.png"; } \ > - description { state: "6" 0.0; inherit: "default" 0.0; image.normal: > "digit_6.png"; } \ > - description { state: "7" 0.0; inherit: "default" 0.0; image.normal: > "digit_7.png"; } \ > - description { state: "8" 0.0; inherit: "default" 0.0; image.normal: > "digit_8.png"; } \ > - description { state: "9" 0.0; inherit: "default" 0.0; image.normal: > "digit_9.png"; } \ > + description { state: "active" 0.0; \ > + inherit: "default" 0.0; \ > + visible: 1; \ > + color: 255 255 255 255; \ > + } \ > } > -#define DIGITC(_NAME, _TO, _CLIP) \ > +#define DIGIT(_NAME, _TO) \ > + ELEM(_NAME"-0", _TO, "0") \ > + ELEM(_NAME"-1", _TO, "1") \ > + ELEM(_NAME"-2", _TO, "2") \ > + ELEM(_NAME"-3", _TO, "3") \ > + ELEM(_NAME"-4", _TO, "4") \ > + ELEM(_NAME"-5", _TO, "5") \ > + ELEM(_NAME"-6", _TO, "6") \ > + ELEM(_NAME"-7", _TO, "7") \ > + ELEM(_NAME"-8", _TO, "8") \ > + ELEM(_NAME"-9", _TO, "9") > +#define ELEMC(_NAME, _TO, _DIGIT, _CLIP) \ > part { name: _NAME; \ > clip_to: _CLIP; \ > description { state: "default" 0.0; \ > rel1.to: _TO; rel2.to: _TO; \ > aspect: (52/72) (52/72); aspect_preference: BOTH; \ > - image.normal: "digit_na.png"; \ > + image.normal: "digit_"_DIGIT".png"; \ > + visible: 0; \ > + color: 255 255 255 0; \ > } \ > - description { state: "0" 0.0; inherit: "default" 0.0; image.normal: > "digit_0.png"; } \ > - description { state: "1" 0.0; inherit: "default" 0.0; image.normal: > "digit_1.png"; } \ > - description { state: "2" 0.0; inherit: "default" 0.0; image.normal: > "digit_2.png"; } \ > - description { state: "3" 0.0; inherit: "default" 0.0; image.normal: > "digit_3.png"; } \ > - description { state: "4" 0.0; inherit: "default" 0.0; image.normal: > "digit_4.png"; } \ > - description { state: "5" 0.0; inherit: "default" 0.0; image.normal: > "digit_5.png"; } \ > - description { state: "6" 0.0; inherit: "default" 0.0; image.normal: > "digit_6.png"; } \ > - description { state: "7" 0.0; inherit: "default" 0.0; image.normal: > "digit_7.png"; } \ > - description { state: "8" 0.0; inherit: "default" 0.0; image.normal: > "digit_8.png"; } \ > - description { state: "9" 0.0; inherit: "default" 0.0; image.normal: > "digit_9.png"; } \ > + description { state: "active" 0.0; \ > + inherit: "default" 0.0; \ > + visible: 1; \ > + color: 255 255 255 255; \ > + } \ > } > +#define DIGITC(_NAME, _TO, _CLIP) \ > + ELEMC(_NAME"-0", _TO, "0", _CLIP) \ > + ELEMC(_NAME"-1", _TO, "1", _CLIP) \ > + ELEMC(_NAME"-2", _TO, "2", _CLIP) \ > + ELEMC(_NAME"-3", _TO, "3", _CLIP) \ > + ELEMC(_NAME"-4", _TO, "4", _CLIP) \ > + ELEMC(_NAME"-5", _TO, "5", _CLIP) \ > + ELEMC(_NAME"-6", _TO, "6", _CLIP) \ > + ELEMC(_NAME"-7", _TO, "7", _CLIP) \ > + ELEMC(_NAME"-8", _TO, "8", _CLIP) \ > + ELEMC(_NAME"-9", _TO, "9", _CLIP) > + > #define TAG(_NAME, _TO, _CLIP) \ > part { name: _NAME; \ > clip_to: _CLIP; \ > @@ -348,7 +368,35 @@ > image.normal: "digit_pm.png"; \ > } \ > } > +#define BASE(_NAME, _BASE, _IMG) \ > + part { name: _NAME; \ > + description { state: "default" 0.0; \ > + rel1.to: _BASE; \ > + rel2.to: _BASE; \ > + image.normal: _IMG; \ > + color: 255 255 255 128; \ > + } \ > + } > +#define BASEC(_NAME, _CLIP, _BASE, _IMG) \ > + part { name: _NAME; \ > + clip_to: _CLIP; \ > + description { state: "default" 0.0; \ > + rel1.to: _BASE; \ > + rel2.to: _BASE; \ > + image.normal: _IMG; \ > + color: 255 255 255 128; \ > + } \ > + } > > + BASE ("ha", "h0-0", "digit_na.png") > + BASE ("hb", "h1-0", "digit_na.png") > + BASE ("ma", "m0-0", "digit_na.png") > + BASE ("mb", "m1-0", "digit_na.png") > + > + BASEC("sa", "secclip", "s0-0", "digit_na.png") > + BASEC("sb", "secclip", "s1-0", "digit_na.png") > + BASEC("aa", "ampmclip", "ap", "digit_nm.png") > + > DIGIT ("h0", "hours1") > DIGIT ("h1", "hours2") > DIGIT ("m0", "mins1") > @@ -357,7 +405,13 @@ > DIGITC("s1", "secs2", "secclip") > TAG("ap", "ampm", "ampmclip") > #undef TAG > -#undef DIGIT > +#undef TAG > +#undef ELEM > +#undef ELEMC > +#undef BASE > +#undef BASEC > +#undef DIGIT > +#undef DIGITC > > part { name: "e.text.today"; type: TEXT; > effect: GLOW; > @@ -388,7 +442,7 @@ > program { > signal: "load"; source: ""; > script { > - clock_cb(0); > + reset(); > } > } > program { > @@ -439,6 +493,39 @@ > reset(); > } > } > +#define DIGPRG(_NAME) \ > + program { \ > + signal: "show,"_NAME; source: "c"; \ > + action: STATE_SET "active" 0.0; \ > + transition: BOUNCE 0.3 0.5 2; \ > + target: _NAME; \ > + } \ > + program { \ > + signal: "hide,"_NAME; source: "c"; \ > + action: STATE_SET "default" 0.0; \ > + transition: DECELERATE 0.3; \ > + target: _NAME; \ > + } > +#define DIGPRGS(_NAME) \ > + DIGPRG(_NAME"-0") \ > + DIGPRG(_NAME"-1") \ > + DIGPRG(_NAME"-2") \ > + DIGPRG(_NAME"-3") \ > + DIGPRG(_NAME"-4") \ > + DIGPRG(_NAME"-5") \ > + DIGPRG(_NAME"-6") \ > + DIGPRG(_NAME"-7") \ > + DIGPRG(_NAME"-8") \ > + DIGPRG(_NAME"-9") > + > + DIGPRGS("h0") > + DIGPRGS("h1") > + DIGPRGS("m0") > + DIGPRGS("m1") > + DIGPRGS("s0") > + DIGPRGS("s1") > +#undef DIGPRG > +#undef DIGPRGS > } > } > > > Modified: trunk/e/data/themes/img/digit_0.png > =================================================================== > (Binary files differ) > > Modified: trunk/e/data/themes/img/digit_1.png > =================================================================== > (Binary files differ) > > Modified: trunk/e/data/themes/img/digit_2.png > =================================================================== > (Binary files differ) > > Modified: trunk/e/data/themes/img/digit_3.png > =================================================================== > (Binary files differ) > > Modified: trunk/e/data/themes/img/digit_4.png > =================================================================== > (Binary files differ) > > Modified: trunk/e/data/themes/img/digit_5.png > =================================================================== > (Binary files differ) > > Modified: trunk/e/data/themes/img/digit_6.png > =================================================================== > (Binary files differ) > > Modified: trunk/e/data/themes/img/digit_7.png > =================================================================== > (Binary files differ) > > Modified: trunk/e/data/themes/img/digit_8.png > =================================================================== > (Binary files differ) > > Modified: trunk/e/data/themes/img/digit_9.png > =================================================================== > (Binary files differ) > > Modified: trunk/e/data/themes/img/digit_na.png > =================================================================== > (Binary files differ) > > > Property changes on: trunk/e/data/themes/img/digit_nm.png > ___________________________________________________________________ > Added: svn:mime-type > + application/octet-stream > > Modified: trunk/e/data/themes/img/digit_pm.png > =================================================================== > (Binary files differ) > > > > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single > web console. Get in-depth insight into apps, servers, databases, vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel