steam2b fix
This commit is contained in:
parent
17928dcbf1
commit
8f732df053
@ -502,7 +502,6 @@ class SettingsTab(ctk.CTkFrame):
|
||||
reset_steamcmd()
|
||||
|
||||
def from_steam_to_boiii_toplevel(self):
|
||||
def main_thread():
|
||||
try:
|
||||
# to make sure json file is up to date
|
||||
main_app.app.library_tab.load_items(main_app.app.edit_destination_folder.get(), dont_add=True)
|
||||
@ -516,41 +515,25 @@ class SettingsTab(ctk.CTkFrame):
|
||||
top.resizable(False, False)
|
||||
# Create input boxes
|
||||
center_frame = ctk.CTkFrame(top)
|
||||
center_frame.grid(row=0, column=0, padx=20, pady=20)
|
||||
|
||||
# Create input boxes
|
||||
steam_folder_label = ctk.CTkLabel(center_frame, text="Steam Folder:")
|
||||
steam_folder_label.grid(row=0, column=0, padx=(20, 20), pady=(10, 0), sticky='w')
|
||||
steam_folder_entry = ctk.CTkEntry(center_frame, width=225)
|
||||
steam_folder_entry.grid(row=1, column=0, columnspan=2, padx=(0, 20), pady=(10, 10), sticky='nes')
|
||||
button_steam_browse = ctk.CTkButton(center_frame, text="Select", width=10)
|
||||
button_steam_browse.grid(row=1, column=2, padx=(0, 20), pady=(10, 10), sticky="wnes")
|
||||
|
||||
boiii_folder_label = ctk.CTkLabel(center_frame, text="boiii Folder:")
|
||||
boiii_folder_label.grid(row=2, column=0, padx=(20, 20), pady=(10, 0), sticky='w')
|
||||
boiii_folder_entry = ctk.CTkEntry(center_frame, width=225)
|
||||
boiii_folder_entry.grid(row=3, column=0, columnspan=2, padx=(0, 20), pady=(10, 10), sticky='nes')
|
||||
button_BOIII_browse = ctk.CTkButton(center_frame, text="Select", width=10)
|
||||
button_BOIII_browse.grid(row=3, column=2, padx=(0, 20), pady=(10, 10), sticky="wnes")
|
||||
|
||||
# Create option to choose between cut or copy
|
||||
operation_label = ctk.CTkLabel(center_frame, text="Choose operation:")
|
||||
operation_label.grid(row=4, column=0, padx=(20, 20), pady=(10, 10), sticky='wnes')
|
||||
copy_var = ctk.BooleanVar()
|
||||
cut_var = ctk.BooleanVar()
|
||||
copy_check = ctk.CTkCheckBox(center_frame, text="Copy", variable=copy_var)
|
||||
cut_check = ctk.CTkCheckBox(center_frame, text="Cut", variable=cut_var)
|
||||
copy_check.grid(row=4, column=1, padx=(0, 10), pady=(10, 10), sticky='wnes')
|
||||
cut_check.grid(row=4, column=2, padx=(0, 10), pady=(10, 10), sticky='nes')
|
||||
|
||||
# Create progress bar
|
||||
progress_bar = ctk.CTkProgressBar(center_frame, mode="determinate", height=20, corner_radius=7)
|
||||
progress_bar.grid(row=5, column=0, columnspan=3, padx=(20, 20), pady=(10, 10), sticky='wnes')
|
||||
progress_text = ctk.CTkLabel(progress_bar, text="0%", font=("Helvetica", 12), fg_color="transparent", text_color="white", height=0, width=0, corner_radius=0)
|
||||
progress_text.place(relx=0.5, rely=0.5, anchor="center")
|
||||
|
||||
copy_button = ctk.CTkButton(center_frame, text="Start (Copy)")
|
||||
copy_button.grid(row=6, column=0, columnspan=3,padx=(20, 20), pady=(10, 10), sticky='wnes')
|
||||
|
||||
# funcs
|
||||
# had to use this shit again cuz of threading issues with widgets
|
||||
@ -705,6 +688,19 @@ class SettingsTab(ctk.CTkFrame):
|
||||
threading.Thread(target=start_thread).start()
|
||||
|
||||
# config
|
||||
center_frame.grid(row=0, column=0, padx=20, pady=20)
|
||||
button_steam_browse.grid(row=1, column=2, padx=(0, 20), pady=(10, 10), sticky="wnes")
|
||||
steam_folder_label.grid(row=0, column=0, padx=(20, 20), pady=(10, 0), sticky='w')
|
||||
steam_folder_entry.grid(row=1, column=0, columnspan=2, padx=(0, 20), pady=(10, 10), sticky='nes')
|
||||
boiii_folder_label.grid(row=2, column=0, padx=(20, 20), pady=(10, 0), sticky='w')
|
||||
boiii_folder_entry.grid(row=3, column=0, columnspan=2, padx=(0, 20), pady=(10, 10), sticky='nes')
|
||||
button_BOIII_browse.grid(row=3, column=2, padx=(0, 20), pady=(10, 10), sticky="wnes")
|
||||
operation_label.grid(row=4, column=0, padx=(20, 20), pady=(10, 10), sticky='wnes')
|
||||
copy_check.grid(row=4, column=1, padx=(0, 10), pady=(10, 10), sticky='wnes')
|
||||
cut_check.grid(row=4, column=2, padx=(0, 10), pady=(10, 10), sticky='nes')
|
||||
progress_bar.grid(row=5, column=0, columnspan=3, padx=(20, 20), pady=(10, 10), sticky='wnes')
|
||||
progress_text.place(relx=0.5, rely=0.5, anchor="center")
|
||||
copy_button.grid(row=6, column=0, columnspan=3,padx=(20, 20), pady=(10, 10), sticky='wnes')
|
||||
progress_color = get_button_state_colors(check_custom_theme(check_config("theme", fallback="boiiiwd_theme.json")), "progress_bar_fill_color")
|
||||
progress_bar.configure(progress_color=progress_color)
|
||||
steam_folder_entry.insert(1, check_config("steam_folder", ""))
|
||||
@ -718,9 +714,7 @@ class SettingsTab(ctk.CTkFrame):
|
||||
main_app.app.create_context_menu(boiii_folder_entry)
|
||||
copy_var.set(True)
|
||||
progress_bar.set(0)
|
||||
main_app.app.after(100, top.focus_force)
|
||||
top.after(120, top.focus_force)
|
||||
|
||||
except Exception as e:
|
||||
show_message("Error", f"{e}", icon="cancel")
|
||||
|
||||
main_app.app.after(0, main_thread)
|
||||
|
Loading…
Reference in New Issue
Block a user