-
Notifications
You must be signed in to change notification settings - Fork 0
/
callback.py
32 lines (24 loc) · 812 Bytes
/
callback.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from VXTool.callback import CallbackProcess
from VXTool.core import AnimatedBuffer, AnimatedDot, Color, Dot
# from VXTool.util import
class Callback(CallbackProcess):
def setup(self):
self.base_dot: Dot = Dot(
pos=(-1, -1),
letter="█",
color=Color(0, 0, 0),
font_name="primary",
clear=True,
)
self.pulse = self.base_dot.variant(AnimatedDot, pos=(5, 5))
self.pulse.op_set(0, "letter", "ABCD")
self.pulse.op_move(1, (1, 0), 3)
self.pulse.op_move(4, (-3, 0))
self.pulse.op_jmp(4, 0)
self.screen = AnimatedBuffer()
self.screen.put(self.pulse)
def update(self):
self.clear()
self.screen.advance()
self.draw(self.screen)
self.present()