added mining ui mode

This commit is contained in:
2022-10-16 16:39:27 +02:00
parent 08d1370001
commit 43926eb6da
4 changed files with 25 additions and 209 deletions

36
mine_overlay.py Normal file
View File

@@ -0,0 +1,36 @@
# Run tkinter code in another thread
import threading
import tkinter as tk
class DiggingOverlay(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.root = tk.Tk
self.EnemyLabel = tk.Label
self.TkPosition = '1440x1150+570+22'
self.start()
def callback(self):
self.root.quit()
def destroy(self):
self.root.destroy()
def run(self):
self.root = tk.Tk()
self.root.geometry(self.TkPosition)
self.root.overrideredirect(1) # fenster ohne aussen rum :-)
self.root.attributes('-alpha', 0.5) # fenster transparent
self.root.attributes('-topmost', 1) # fenster immer im vordergrund
self.root.resizable(False, False)
self.root.wm_attributes("-disabled", True)
self.root.configure(background='black')
self.root.mainloop()
def hide_window(self):
self.root.attributes('-alpha', 0.0)
def show_window(self):
self.root.attributes('-alpha', 0.2)