Skip to content

Commit

Permalink
meh
Browse files Browse the repository at this point in the history
  • Loading branch information
RainbowTabitha committed Feb 4, 2024
1 parent 10f3c43 commit d38b28c
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 48 deletions.
Binary file added assets/error.ico
Binary file not shown.
Binary file modified assets/error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/success.ico
Binary file not shown.
29 changes: 29 additions & 0 deletions functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,32 @@ def check_for_updates():
def run_update():
url = "https://github.com/EndangeredNayla/Mario-Party-Toolkit/releases"
webbrowser.open_new_tab(url)

def createDialog(windowTitle, warn, info, buttonTxt=None):
completeWindow = ctk.CTkToplevel()
completeWindow.geometry("600x165")
completeWindow.title(windowTitle)

# Load success image and display it in the success window
img = ctk.CTkImage(Image.open(fetchResource("assets/" + warn + ".png")), size=(100, 100))
imgLabel = ctk.CTkLabel(completeWindow, image=img, text="")
imgLabel.grid(row=0, column=0, padx=10, pady=10)
imgLabel.image = img # Keep a reference to the image

if buttonTxt == None:
pass
else:
try:
button = ctk.CTkButton(completeWindow, command=run_update, text=buttonTxt)
button.grid(row=1, column=0, padx=50, pady=10)
except:
pass

# Configure row and column weights
completeWindow.columnconfigure(0, weight=1)
completeWindow.rowconfigure(0, weight=1)

# Display success message in the success window
label = ctk.CTkLabel(completeWindow, text=info, font=ctk.CTkFont(size=18))
label.grid(row=0, column=1, padx=25, pady=10)
completeWindow.focus()
Loading

0 comments on commit d38b28c

Please sign in to comment.