From 824189c2c389d297490a839787f567d508209ac4 Mon Sep 17 00:00:00 2001 From: Cuptain Date: Fri, 21 Jun 2024 00:52:24 +1000 Subject: [PATCH] tabs in the gui --- Main.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Main.py b/Main.py index 23d6afa..901c328 100644 --- a/Main.py +++ b/Main.py @@ -52,14 +52,23 @@ def main(): app = CTk() app.title("FamilyCraft Launcher") set_appearance_mode("dark") + + # Tabs to seperate options from launching the game + guitabs = CTkTabview(master=app) + guitabs.pack(padx=0, pady=0) + + guitabs.add("Launcher") + guitabs.add("Options") + + #root.title("Select Prism Instance Path") # Label for instructions - label = CTkLabel(master=app, text="Select Prism instance path:", font=("Impact", 30)) + label = CTkLabel(master=guitabs.tab("Options"), text="Select Prism instance path:", font=("Impact", 30)) label.pack(pady=10) # Entry widget for Prism instance path - prism_instance_path_entry = CTkEntry(master=app, width=350, font=("Arial", 14)) + prism_instance_path_entry = CTkEntry(master=guitabs.tab("Options"), width=350, font=("Arial", 14)) prism_instance_path_entry.pack(pady=5) # If a stored Prism instance path exists, pre-fill the entry widget @@ -67,7 +76,7 @@ def main(): prism_instance_path_entry.insert(0, stored_prism_instance_path) # Button to select directory - select_button = CTkButton(master=app, text="Browse...", command=select_prism_instance_path) + select_button = CTkButton(master=guitabs.tab("Options"), text="Browse...", command=select_prism_instance_path) select_button.pack(pady=5) # Function to proceed with installation @@ -77,7 +86,7 @@ def main(): Backend.perform_installation(instance_name, prism_command, prism_instance_path) # Button to start installation - install_button = CTkButton(master=app, text="Launch Minecraft", command=start_installation) + install_button = CTkButton(master=guitabs.tab("Launcher"), text="Launch Minecraft", command=start_installation) install_button.pack(pady=10) app.mainloop()