-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOptions.py
More file actions
77 lines (64 loc) · 2.2 KB
/
Options.py
File metadata and controls
77 lines (64 loc) · 2.2 KB
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
from tkinter import *
import customtkinter as ctk
from Roots import Roots
class Options:
# Potentially append the action to the end of the list and use the same method as populate array to dynamically add the item to the list
actions = ["Assorted Magic","BurningEffect",
"SlowEffect",
"FrozenEffect",
"PoisonedEffect",]
T_OR_F = ["true", "false"]
attack_options = ctk.StringVar(value="")
attack_actions = ctk.StringVar(value="")
look_to_target = ctk.StringVar(value="false")
looped = ctk.StringVar(value="true")
looped_dropdown = ctk.CTkOptionMenu(
Roots.initialFrame,
values=T_OR_F,
variable=looped,
fg_color="#203547",
button_color="#203547",
)
look_to_target_dropdown = ctk.CTkOptionMenu(
Roots.initialFrame,
values=T_OR_F,
variable=look_to_target,
fg_color="#203547",
button_color="#203547",
)
attack_action_dropdown = ctk.CTkOptionMenu(
Roots.initialFrame,
values=actions,
variable=attack_actions,
fg_color="#203547",
button_color="#203547",
)
attack_action_dropdown.grid(row=1, column=8, padx=2, pady=4)
dropdown2 = ctk.CTkOptionMenu(
Roots.initialFrame,
values=[],
variable=attack_options,
fg_color="#203547",
button_color="#203547",
)
dropdown2.grid(row=0, column=8, padx=2, pady=4)
def populate_options_actions(sprite):
Options.actions.append(sprite)
attack_action_dropdown = ctk.CTkOptionMenu(
Roots.initialFrame,
values=Options.actions,
variable=Options.attack_actions,
fg_color="#203547",
button_color="#203547",
)
attack_action_dropdown.grid(row=1, column=8, padx=2, pady=4)
# ATTACK ACTION FEATURE | WIP
def populate_options(dynamic_options):
dropdown2 = ctk.CTkOptionMenu(
Roots.initialFrame,
values=dynamic_options,
variable=Options.attack_options,
fg_color="#203547",
button_color="#203547",
)
dropdown2.grid(row=0, column=8, padx=2, pady=4)