mirror of
https://github.com/fishyboteso/fishyboteso.git
synced 2024-08-30 18:32:13 +00:00
removed drm from full auto
This commit is contained in:
parent
25bec628fd
commit
df2ab36021
@ -50,5 +50,5 @@ class GUIFuncs:
|
||||
def start_engine(self):
|
||||
def start_engine():
|
||||
config.set("last_started", self.gui._engine_var.get())
|
||||
self.gui.engines[self.gui._engine_var.get()][1]()
|
||||
self.gui.engines[self.gui._engine_var.get()].start()
|
||||
self.gui.call_in_thread(start_engine)
|
||||
|
@ -4,6 +4,7 @@ import threading
|
||||
import tkinter as tk
|
||||
import uuid
|
||||
from typing import Any, Callable, Dict, Optional
|
||||
from dataclasses import dataclass
|
||||
|
||||
from ttkthemes import ThemedTk
|
||||
|
||||
@ -18,6 +19,12 @@ from . import main_gui
|
||||
from .log_config import GUIStreamHandler
|
||||
|
||||
|
||||
@dataclass
|
||||
class EngineRunner:
|
||||
config: Callable
|
||||
start: Callable
|
||||
|
||||
|
||||
class GUI:
|
||||
def __init__(self, get_engine: Callable[[], IEngineHandler]):
|
||||
self.funcs = GUIFuncs(self)
|
||||
@ -58,13 +65,13 @@ class GUI:
|
||||
@property
|
||||
def engines(self):
|
||||
engines = {
|
||||
"Semi Fisher": [lambda: config_top.start_semifisher_config(self), # start config function
|
||||
self.engine.toggle_semifisher], # start engine function
|
||||
"Semi Fisher": EngineRunner(lambda: config_top.start_semifisher_config(self),
|
||||
self.engine.toggle_semifisher),
|
||||
|
||||
"Full-Auto Fisher": EngineRunner(lambda: config_top.start_fullfisher_config(self),
|
||||
self.engine.toggle_fullfisher)
|
||||
}
|
||||
|
||||
if web.has_beta():
|
||||
engines["Full-Auto Fisher"] = [lambda: config_top.start_fullfisher_config(self),
|
||||
self.engine.toggle_fullfisher]
|
||||
return engines
|
||||
|
||||
def create(self):
|
||||
|
@ -110,7 +110,8 @@ def _create(gui: 'GUI'):
|
||||
gui._engine_select = ttk.OptionMenu(start_frame, gui._engine_var, last_started, *labels)
|
||||
gui._engine_select.pack(side=tk.LEFT)
|
||||
|
||||
gui._config_button = ttk.Button(start_frame, text="⚙", width=0, command=lambda: engines[gui._engine_var.get()][0]())
|
||||
gui._config_button = ttk.Button(start_frame, text="⚙", width=0,
|
||||
command=lambda: engines[gui._engine_var.get()].config())
|
||||
gui._config_button.pack(side=tk.RIGHT)
|
||||
|
||||
gui._start_button = ttk.Button(start_frame, text=gui._get_start_stop_text(), width=25,
|
||||
|
Loading…
Reference in New Issue
Block a user