Automatically open mods menu when dragging a mod which also prevents issues when installing a mod from the launcher menu

This commit is contained in:
Mr-Wiseguy
2025-06-22 15:58:32 -04:00
parent b8ebb485d6
commit c01351d008

View File

@@ -900,6 +900,13 @@ void recompui::drop_files(const std::list<std::filesystem::path> &file_list) {
return;
}
recompui::set_config_tab(recompui::ConfigTab::Mods);
// If the config menu isn't open, open it in the mods tab.
if (!recompui::is_context_shown(recompui::get_config_context_id())) {
recompui::hide_all_contexts();
recompui::show_context(recompui::get_config_context_id(), "");
}
recompui::open_notification("Installing Mods", "Please Wait");
// TODO: Needs a progress callback and a prompt for every mod that needs to be confirmed to be overwritten.
// TODO: Run this on a background thread and use the callbacks to advance the state instead of blocking.