mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
added loading layout playground
This commit is contained in:
parent
16f81c3264
commit
be01cee8d3
BIN
assets/gears.png
Normal file
BIN
assets/gears.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
BIN
assets/gears2.png
Normal file
BIN
assets/gears2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
assets/gears3.png
Normal file
BIN
assets/gears3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
16
src/apps/playground_chren/layout_loading.py
Normal file
16
src/apps/playground_chren/layout_loading.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
from trezor import ui
|
||||||
|
from trezor import loop
|
||||||
|
from trezor import res
|
||||||
|
|
||||||
|
def layout_loading():
|
||||||
|
|
||||||
|
ui.display.text_center(120, 240 - 18, 'Processing ...', ui.BOLD, ui.WHITE, ui.BLACK)
|
||||||
|
p = 0
|
||||||
|
|
||||||
|
def func(foreground):
|
||||||
|
ui.display.loader(p, ui.YELLOW, 0, res.load('apps/playground_chren/res/gears3.toig'), ui.WHITE)
|
||||||
|
p = (p + 10) % 1000
|
||||||
|
|
||||||
|
animation = ui.animate_pulse(func, ui.WHITE, ui.GREY, speed=400000)
|
||||||
|
|
||||||
|
yield from animation
|
BIN
src/apps/playground_chren/res/gears3.toig
Normal file
BIN
src/apps/playground_chren/res/gears3.toig
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user