From fed9309ffab76bf2831340c52298da88b493c39c Mon Sep 17 00:00:00 2001 From: chren Date: Mon, 13 Jun 2016 16:15:48 +0200 Subject: [PATCH] added playground of scrollicon --- src/apps/playground_chren/__init__.py | 2 ++ .../playground_chren/layout_scrollicon.py | 19 +++++++++++++++++++ src/main.py | 2 ++ 3 files changed, 23 insertions(+) create mode 100644 src/apps/playground_chren/__init__.py create mode 100644 src/apps/playground_chren/layout_scrollicon.py diff --git a/src/apps/playground_chren/__init__.py b/src/apps/playground_chren/__init__.py new file mode 100644 index 000000000..52e13fec2 --- /dev/null +++ b/src/apps/playground_chren/__init__.py @@ -0,0 +1,2 @@ +def boot(): + print("chrenova appka") diff --git a/src/apps/playground_chren/layout_scrollicon.py b/src/apps/playground_chren/layout_scrollicon.py new file mode 100644 index 000000000..3adfa8dc7 --- /dev/null +++ b/src/apps/playground_chren/layout_scrollicon.py @@ -0,0 +1,19 @@ +from trezor import ui +from trezor import loop + +def layout_scrollicon(): + + def func_top(foreground): + ui.display.bar(102, 216, 36, 4, foreground) + + def func_middle(foreground): + ui.display.bar(106, 223, 28, 4, foreground) + + def func_bottom(foreground): + ui.display.bar(110, 230, 20, 4, foreground) + + animation_top = ui.animate_pulse(func_top, ui.GREY, ui.BLACK, speed=300000, delay=0) + animation_middle = ui.animate_pulse(func_middle, ui.GREY, ui.BLACK, speed=300000, delay=100000) + animation_bottom = ui.animate_pulse(func_bottom, ui.GREY, ui.BLACK, speed=300000, delay=200000) + + yield loop.Wait([animation_top, animation_middle, animation_bottom]) diff --git a/src/main.py b/src/main.py index 83bf0bdd0..5a0512b9e 100644 --- a/src/main.py +++ b/src/main.py @@ -3,12 +3,14 @@ from trezor import msg # Load all applications from apps import playground +from apps import playground_chren from apps import homescreen from apps import management from apps import wallet # Initialize all applications playground.boot() +playground_chren.boot() homescreen.boot() management.boot() wallet.boot()