fishyboteso/fishy/gui/funcs.py
DESKTOP-JVKHS7I\Adam 1ae645294d ai fix and full-auto test setup:
gui
- enable "Debug > Keep Console" to unhide full auto
- Removed Log Dump from Debug menu

semi-auto
- starting ai fix, sometime bot doesnt start
- minimize bug fix, when minimized gui goes out of sync
- keyboard button to pause play, now bot can be paused and played using f9
- now shows running as admin message
- better error message, now tells to check #read-me-first instead

full-auto
- add tesseract binary in directory
- install addon for full auto
2020-06-25 07:02:34 +05:30

28 lines
657 B
Python

from tkinter import messagebox
import typing
if typing.TYPE_CHECKING:
from fishy.gui import GUI
# noinspection PyProtectedMember
class GUIFuncs:
def __init__(self, gui: 'GUI'):
self.gui = gui
def show_error(self, error):
self.gui.call_in_thread(lambda: messagebox.showerror("ERROR", error))
def bot_started(self, started):
def func():
self.gui._bot_running = started
self.gui._start_button["text"] = self.gui._get_start_stop_text()
self.gui.call_in_thread(func)
def quit(self):
def func():
self.gui._root.destroy()
self.gui.call_in_thread(func)