Created
July 30, 2013 16:17
-
-
Save igkuz/6114432 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //SFKJS | |
| const Clutter = imports.gi.Clutter; | |
| var white = new Clutter.Color(); | |
| white.from_string('white'); | |
| var currentDate = function() { | |
| var currentdate = new Date(); | |
| return currentdate.getHours() + ":" + currentdate.getMinutes() + ":" + currentdate.getSeconds(); | |
| } | |
| var text = new Clutter.Text({ | |
| text: currentDate(), | |
| font_name: 'Sans 36', | |
| x: 400, | |
| y: 550, | |
| color: white | |
| }); | |
| timeline = new Clutter.Timeline({ | |
| duration: 1000, | |
| loop: true, | |
| auto_reverse: true | |
| }); | |
| timeline.on_timeline_new_frame = function(timeline, frame_num) { | |
| text.text = currentDate(); | |
| return true; | |
| } | |
| root.add_actor(text) | |
| timeline.connect('new-frame', timeline.on_timeline_new_frame); | |
| nptv_run_timeline(timeline); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment