list order fix

This commit is contained in:
Cuptain 2024-06-21 08:54:45 +10:00
parent d37333c569
commit 1023de915f

14
Main.py
View File

@ -94,13 +94,18 @@ def main():
modpacks = Backend.getModpacks() modpacks = Backend.getModpacks()
for modpack in modpacks: for modpack in modpacks:
options.append(modpack["name"]) options.append(modpack["name"])
sorted_pack_selection = sorted(options)
sorted_pack_selection.reverse()
# Button to select directory # Button to select directory
modpack_var = StringVar(value="N/A") modpack_var = StringVar(value="N/A")
modpack_label = CTkLabel(master=guitabs.tab("Launcher"), text="Select Modpack:", font=("Impact", 30)) #modpack_label = CTkLabel(master=guitabs.tab("Launcher"), text="Select Modpack:", font=("Impact", 30))
modpack_label.pack() #modpack_label.pack()
modpack_selector = CTkOptionMenu(master=guitabs.tab("Launcher"), values=options, variable=modpack_var) modpack_selector = CTkOptionMenu(master=guitabs.tab("Launcher"), values=sorted_pack_selection, variable=modpack_var)
modpack_selector.set(options[0]) modpack_selector.set(options[0])
modpack_selector.pack()
select_button = CTkButton(master=guitabs.tab("Options"), 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) select_button.pack(pady=5)
@ -118,6 +123,7 @@ def main():
# Button to start installation # Button to start installation
install_button = CTkButton(master=guitabs.tab("Launcher"), text="Launch Minecraft", command=start_installation) install_button = CTkButton(master=guitabs.tab("Launcher"), text="Launch Minecraft", command=start_installation)
install_button.pack(pady=10) install_button.pack(pady=10)
modpack_selector.pack(pady=20)
app.mainloop() app.mainloop()