mirror of
https://github.com/fishyboteso/fishyboteso.git
synced 2024-08-30 18:32:13 +00:00
removed fullscreen config from semi fisher
This commit is contained in:
parent
381f573109
commit
7a93b18ec6
@ -25,7 +25,6 @@ class WindowServer:
|
|||||||
"""
|
"""
|
||||||
Screen = None
|
Screen = None
|
||||||
windowOffset = None
|
windowOffset = None
|
||||||
titleOffset = None
|
|
||||||
hwnd = None
|
hwnd = None
|
||||||
status = Status.STOPPED
|
status = Status.STOPPED
|
||||||
|
|
||||||
@ -40,9 +39,6 @@ def init():
|
|||||||
rect = win32gui.GetWindowRect(WindowServer.hwnd)
|
rect = win32gui.GetWindowRect(WindowServer.hwnd)
|
||||||
client_rect = win32gui.GetClientRect(WindowServer.hwnd)
|
client_rect = win32gui.GetClientRect(WindowServer.hwnd)
|
||||||
WindowServer.windowOffset = math.floor(((rect[2] - rect[0]) - client_rect[2]) / 2)
|
WindowServer.windowOffset = math.floor(((rect[2] - rect[0]) - client_rect[2]) / 2)
|
||||||
WindowServer.titleOffset = ((rect[3] - rect[1]) - client_rect[3]) - WindowServer.windowOffset
|
|
||||||
if config.get("borderless"):
|
|
||||||
WindowServer.titleOffset = 0
|
|
||||||
WindowServer.status = Status.RUNNING
|
WindowServer.status = Status.RUNNING
|
||||||
except pywintypes.error:
|
except pywintypes.error:
|
||||||
logging.error("Game window not found")
|
logging.error("Game window not found")
|
||||||
@ -59,8 +55,13 @@ def loop():
|
|||||||
temp_screen = np.array(ImageGrab.grab(bbox=bbox))
|
temp_screen = np.array(ImageGrab.grab(bbox=bbox))
|
||||||
|
|
||||||
rect = win32gui.GetWindowRect(WindowServer.hwnd)
|
rect = win32gui.GetWindowRect(WindowServer.hwnd)
|
||||||
|
client_rect = win32gui.GetClientRect(WindowServer.hwnd)
|
||||||
|
|
||||||
|
fullscreen = GetSystemMetrics(1) == (rect[3] - rect[1])
|
||||||
|
titleOffset = ((rect[3] - rect[1]) - client_rect[3]) - WindowServer.windowOffset if not fullscreen else 0
|
||||||
|
|
||||||
crop = (
|
crop = (
|
||||||
rect[0] + WindowServer.windowOffset, rect[1] + WindowServer.titleOffset, rect[2] - WindowServer.windowOffset,
|
rect[0] + WindowServer.windowOffset, rect[1] + titleOffset, rect[2] - WindowServer.windowOffset,
|
||||||
rect[3] - WindowServer.windowOffset)
|
rect[3] - WindowServer.windowOffset)
|
||||||
|
|
||||||
WindowServer.Screen = temp_screen[crop[1]:crop[3], crop[0]:crop[2]]
|
WindowServer.Screen = temp_screen[crop[1]:crop[3], crop[0]:crop[2]]
|
||||||
|
@ -79,7 +79,6 @@ def start_semifisher_config(gui: 'GUI'):
|
|||||||
def save():
|
def save():
|
||||||
gui.config.set("action_key", action_key_entry.get(), False)
|
gui.config.set("action_key", action_key_entry.get(), False)
|
||||||
gui.config.set("collect_key", collect_key_entry.get(), False)
|
gui.config.set("collect_key", collect_key_entry.get(), False)
|
||||||
gui.config.set("borderless", borderless.instate(['selected']), False)
|
|
||||||
gui.config.set("jitter", jitter.instate(['selected']), False)
|
gui.config.set("jitter", jitter.instate(['selected']), False)
|
||||||
gui.config.set("sound_notification", sound.instate(['selected']), False)
|
gui.config.set("sound_notification", sound.instate(['selected']), False)
|
||||||
gui.config.save_config()
|
gui.config.save_config()
|
||||||
@ -111,29 +110,25 @@ def start_semifisher_config(gui: 'GUI'):
|
|||||||
gui._notify_check['state'] = tk.NORMAL
|
gui._notify_check['state'] = tk.NORMAL
|
||||||
gui._notify.set(is_subbed[0])
|
gui._notify.set(is_subbed[0])
|
||||||
|
|
||||||
ttk.Label(controls_frame, text="Fullscreen: ").grid(row=1, column=0, pady=(5, 5))
|
ttk.Label(controls_frame, text="Action Key:").grid(row=1, column=0)
|
||||||
borderless = ttk.Checkbutton(controls_frame, var=tk.BooleanVar(value=config.get("borderless")))
|
|
||||||
borderless.grid(row=1, column=1)
|
|
||||||
|
|
||||||
ttk.Label(controls_frame, text="Action Key:").grid(row=2, column=0)
|
|
||||||
action_key_entry = ttk.Entry(controls_frame, justify=tk.CENTER)
|
action_key_entry = ttk.Entry(controls_frame, justify=tk.CENTER)
|
||||||
action_key_entry.grid(row=2, column=1)
|
action_key_entry.grid(row=1, column=1)
|
||||||
action_key_entry.insert(0, config.get("action_key", "e"))
|
action_key_entry.insert(0, config.get("action_key", "e"))
|
||||||
action_key_entry.bind("<KeyRelease>", del_entry_key)
|
action_key_entry.bind("<KeyRelease>", del_entry_key)
|
||||||
|
|
||||||
ttk.Label(controls_frame, text="Looting Key:").grid(row=4, column=0, pady=(5, 5))
|
ttk.Label(controls_frame, text="Looting Key:").grid(row=3, column=0, pady=(5, 5))
|
||||||
collect_key_entry = ttk.Entry(controls_frame, justify=tk.CENTER)
|
collect_key_entry = ttk.Entry(controls_frame, justify=tk.CENTER)
|
||||||
collect_key_entry.grid(row=4, column=1, pady=(5, 5))
|
collect_key_entry.grid(row=3, column=1, pady=(5, 5))
|
||||||
collect_key_entry.insert(0, config.get("collect_key", "r"))
|
collect_key_entry.insert(0, config.get("collect_key", "r"))
|
||||||
collect_key_entry.bind("<KeyRelease>", del_entry_key)
|
collect_key_entry.bind("<KeyRelease>", del_entry_key)
|
||||||
|
|
||||||
ttk.Label(controls_frame, text="Sound Notification: ").grid(row=5, column=0, pady=(5, 5))
|
ttk.Label(controls_frame, text="Sound Notification: ").grid(row=4, column=0, pady=(5, 5))
|
||||||
sound = ttk.Checkbutton(controls_frame, var=tk.BooleanVar(value=config.get("sound_notification")))
|
sound = ttk.Checkbutton(controls_frame, var=tk.BooleanVar(value=config.get("sound_notification")))
|
||||||
sound.grid(row=5, column=1)
|
sound.grid(row=4, column=1)
|
||||||
|
|
||||||
ttk.Label(controls_frame, text="Human-Like Delay: ").grid(row=6, column=0, pady=(5, 5))
|
ttk.Label(controls_frame, text="Human-Like Delay: ").grid(row=5, column=0, pady=(5, 5))
|
||||||
jitter = ttk.Checkbutton(controls_frame, var=tk.BooleanVar(value=config.get("jitter")))
|
jitter = ttk.Checkbutton(controls_frame, var=tk.BooleanVar(value=config.get("jitter")))
|
||||||
jitter.grid(row=6, column=1)
|
jitter.grid(row=5, column=1)
|
||||||
|
|
||||||
controls_frame.pack(padx=(5, 5), pady=(5, 5))
|
controls_frame.pack(padx=(5, 5), pady=(5, 5))
|
||||||
top.start()
|
top.start()
|
||||||
@ -142,5 +137,5 @@ def start_semifisher_config(gui: 'GUI'):
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
from fishy.gui import GUI
|
from fishy.gui import GUI
|
||||||
gui = GUI(lambda: IEngineHandler())
|
gui = GUI(lambda: IEngineHandler())
|
||||||
gui.call_in_thread(lambda: start_fullfisher_config(gui))
|
gui.call_in_thread(lambda: start_semifisher_config(gui))
|
||||||
gui.create()
|
gui.create()
|
||||||
|
Loading…
Reference in New Issue
Block a user