-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtkinter_main.py
55 lines (42 loc) · 1.11 KB
/
tkinter_main.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
from tkinter import *
import memory.tkinter
from memory.tkinter import (
base_process_ptr,
get_story_progress,
battle_active,
battle_type,
get_encounter_id,
turn_ready,
get_current_turn,
battle_wrap_up_active,
get_map,
user_control,
get_coords,
get_gil_value,
menu_open,
rng_seed
)
from random import randint
import time
memory.tkinter.start()
root = Tk()
root.geometry("800x600+10+20")
root.title('aVIna_FFX_status_window')
lab = Label(root)
lab.pack()
process_val = Entry(root, text=base_process_ptr(), bd=7, state='disabled')
process_val.pack()
story_int = Entry(root, text=get_story_progress(), bd=5, state='disabled')
story_int.pack()
v1 = bool(battle_active())
battle_active_var = Checkbutton(root, text = "Battle Active", variable = v1, state='disabled')
battle_active_var.pack()
destroy_button=Button(root, text="Destroy This Window", command=root.destroy)
destroy_button.pack()
def update():
story_int['text'] = get_story_progress()
root.after(100, update) # run itself again after 1000 ms
# run first time
update()
root.mainloop()
quit()