-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
112 lines (94 loc) · 3.06 KB
/
test.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
from gradientmessagebox import *
import time
# shared = SharedRoot()
def test_1(*args):
print('1')
w = PresetLoadingMessage('LOADING')
w.Play()
time.sleep(5)
# win = PresetThreadedMessage('TEST!!!')
# win.Show()
def test_2(*args):
w = PresetPromptWindow(text)
w.Prompt()
print('2')
def test_3(*args):
link_txt = "https://docs.cartesi.io/cartesi-rollups/1.5/tutorials/erc-721-token-wallet/"
w = PresetWidePromptWindow(link_txt)
w.Prompt()
print(args)
print('3')
def test_4(*args):
link_txt = "https://docs.cartesi.io/cartesi-rollups/1.5/tutorials/erc-721-token-wallet/"
w = PresetLinkWindow(link_txt)
w.Prompt()
print('4')
def test_5(*args):
print('5')
#config = ColorConfig(450, 300)
config = ColorConfig(width=450, height=300, color1="#4ed8a7", color2="#cf5270", alpha=1.0, saturation=1.0, direct='+x', hasFrame=True)
bar_config = ColorConfig(width=600, height=50, color1="#4ed8a7", color2="#cf5270", alpha=1.0, saturation=1.0, direct='+x', hasFrame=False)
#config = ColorConfig(350, 200, '#00ffff', '#ffa500', 0.99, 0.8, '-y', True)
#config.swap_mg_for_bg()
#config.invert()
#config.fg_saturation(0.5)
#config.bg_saturation(0.5)
#config.gradient_saturation(0.5)
config.imagery('./hvym_3d_logo.png', './logo.png')
config.animation(20, 4)
bar_config.animation(20, 1)
txt = '''this is a multi line string
that is going to span multiple lines
that is going to span multiple lines
that is going to span multiple lines
that is going to span multiple lines
that is going to span multiple lines
that is going to span multiple lines
that is going to span multiple lines
that is going to span multiple lines'''
#win = ChoiceWindow(config)
#win = MultiTextChoiceWindow(config)
#win = CopyTextWindow(config)
#win = UserPasswordWindow(config)
#win = ThreadedWindow(TextWindow, bar_config, 'HEAVYMETA')
# win = PresetLoadingMessage('LOADING', None)
# win.Play()
cool='''
Cool?
'''
text = '''A very simple tkinter prompt window
with an animated gradient background.'''
# win = PresetChoiceWindow(cool, 'Yup', 'Nope')
# win.Ask()
#win = PresetDropDownWindow(txt)
#win = PresetChoiceEntryWindow(txt, '1', '2')
#win = PresetChoiceMultilineEntryWindow(txt, '1', '2')
#x = win.Ask()
btn_dict = { '1': test_1, '2': test_2,'3': test_3,'4': test_4,'5': test_5 }
win = PresetMultiButtonWindow(btn_dict)
win.Show()
#win = PresetCopyTextWindow(txt)
#win = PresetFileSelectWindow(txt)
#win.default_entry_text('Some default text')
#win = PresetImageBgMessage(msg='HEAVYMETA', bg_img='./hvym_3d_logo.png', logo_img='./logo.png')
#win = PresetUserPasswordWindow(txt, '1', '2')
# win = PresetPromptWindow(text)
# win.Prompt()
# win.custom_txt_color('black')
#win.custom_msg_color('pink')
#win.set_title_text('GRADIENT MESSAGE BOX')
#win.set_file_select_types([("SVG Files", "*.svg"), ("PNG Files", "*.png")])
#win.imagery('./hvym_3d_logo.png', './logo.png')
#win.vertical_btns()
#x = win.Prompt()
#x = win.FileSelect()
#x = win.Ask('Ask a question?', 'copy', 'cancel', txt)
#x = win.Show()
#win.Play()
#x=win.DropDown(['1', '2', '3'])
#print(x.response)
time.sleep(5)
# win.Close()
#win.Stop()
# print('GETS HERE')
#win.Show()