mirror of
https://github.com/fishyboteso/fishyboteso.git
synced 2024-08-30 18:32:13 +00:00
18 lines
484 B
Python
18 lines
484 B
Python
|
from tkinter import messagebox, NORMAL
|
||
|
|
||
|
|
||
|
# noinspection PyProtectedMember
|
||
|
class GUIFuncs:
|
||
|
def __init__(self, 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"] = "STOP" if self.gui._bot_running else "START"
|
||
|
|
||
|
self.gui.call_in_thread(func)
|