You've already forked AiraPulsar
更新 "注册为观察者(事件驱动)" 功能
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
import vgl
|
||||
import time
|
||||
window = None
|
||||
|
||||
window = vgl.Window(title="Pulsar", size=(1024, 768))
|
||||
|
||||
def horizontal_indicator():
|
||||
global window
|
||||
frame = vgl.Frame().attach(window_object=window, poscale=(0, 0), clone_name="Horizontal Indicator")
|
||||
vgl.elements.Line(ends=[(0.4, 0.5), (0.6, 0.5)], color="green").attach(frame_object=frame)
|
||||
pass
|
||||
|
||||
@window.observerize
|
||||
def observer(info):
|
||||
print(info)
|
||||
def marking_lines():
|
||||
print("实例")
|
||||
global window
|
||||
frame = vgl.Frame().attach(window_object=window, poscale=(0,0), clone_name="Marking Line")
|
||||
for i in range(0, 24):
|
||||
@@ -25,10 +31,10 @@ def console():
|
||||
|
||||
if __name__ == '__main__':
|
||||
print("Welcome to AiraPulsar Client")
|
||||
window = vgl.Window(title="Pulsar", size=(1024, 768))
|
||||
window.start()
|
||||
horizontal_indicator()
|
||||
marking_lines()
|
||||
observer()
|
||||
#console()
|
||||
input("任意键以退出")
|
||||
window.kill()
|
||||
|
Reference in New Issue
Block a user