diff --git a/combined_user_interface.py b/combined_user_interface.py index dc0b34b..15484c2 100644 --- a/combined_user_interface.py +++ b/combined_user_interface.py @@ -1,6 +1,7 @@ # Run tkinter code in another thread import threading import tkinter as tk +import game_base_class from tkinter import ttk from mine_overlay import DiggingOverlay @@ -67,7 +68,7 @@ class PrimaryOverlay(threading.Thread): self.start() def run(self): - self.MiningOverlay = DiggingOverlay() + self.MiningOverlay = DiggingOverlay(game_base_class.MINING_LARGE) self.root = tk.Tk() self.rb_frame = tk.Frame(self.root) diff --git a/config_file.py b/config_file.py index 82e4cca..5205301 100644 --- a/config_file.py +++ b/config_file.py @@ -59,9 +59,12 @@ class UserConfigs: else: pass - def returnDiggingWindowPos2(self): + def returnDiggingWindowPos2(self, large=True): if self.user == self.THALOUSER: - return [1440, 1150, 570, 22] + if large: + return [1440, 1150, 570, 22] + else: + return [1440, 210, 560, 700] elif self.user == self.ADWAUSER: return [740, 450, 1625, 985] elif self.user == self.EDDIEUSER: diff --git a/game_base_class.py b/game_base_class.py index 9d57468..b273514 100644 --- a/game_base_class.py +++ b/game_base_class.py @@ -29,6 +29,7 @@ TENESENT = 23 CIBUTRANT = 24 ARTISENT = 25 +MINING_LARGE = True class GameBase: diff --git a/mine.py b/mine.py index 08f0a8a..12a1f20 100644 --- a/mine.py +++ b/mine.py @@ -1,4 +1,6 @@ import cv2 as cv + +import game_base_class from utils import dig_point, check_for_ok_button from game_base_class import GameBase from window_capture import WindowCapture @@ -63,8 +65,8 @@ class Mine(GameBase): elif self.level % 2 == 0: self.plot_size = self.plot_size - 1 - p1 = int((self.config.returnDiggingWindowPos2()[0] / 2) + self.config.returnDiggingWindowPos2()[2]) - p2 = int((self.config.returnDiggingWindowPos2()[1] / 2) + self.config.returnDiggingWindowPos2()[3]) + p1 = int((self.config.returnDiggingWindowPos2(game_base_class.MINING_LARGE)[0] / 2) + self.config.returnDiggingWindowPos2(game_base_class.MINING_LARGE)[2]) + p2 = int((self.config.returnDiggingWindowPos2(game_base_class.MINING_LARGE)[1] / 2) + self.config.returnDiggingWindowPos2(game_base_class.MINING_LARGE)[3]) # start 705 , 564 -> click # move L D -> click diff --git a/mine_overlay.py b/mine_overlay.py index a1ec91d..8060337 100644 --- a/mine_overlay.py +++ b/mine_overlay.py @@ -5,11 +5,14 @@ import tkinter as tk class DiggingOverlay(threading.Thread): - def __init__(self): + def __init__(self, large_display=True): threading.Thread.__init__(self) self.root = tk.Tk self.EnemyLabel = tk.Label - self.TkPosition = '1440x1150+570+22' + if large_display: + self.TkPosition = '1440x1150+570+22' + else: + self.TkPosition = '1440x210+560+700' self.setDaemon(True) self.start()