Confirmation messages added when a task has been completed, e.g. install, upgrade, remove.

This commit is contained in:
Storm Dragon
2025-08-06 14:37:27 -04:00
parent 17e7cac021
commit 94d9caa707

View File

@ -638,6 +638,8 @@ game_installer() {
if [[ -f "$installScript" ]]; then if [[ -f "$installScript" ]]; then
# Source and execute the install script # Source and execute the install script
source "$installScript" source "$installScript"
# Show success message
ui_msgbox "Game Installer" "Game Installer" "${game} has been installed."
else else
ui_msgbox "Game Installer" "Game Installer" "Installation script not found for ${game}" ui_msgbox "Game Installer" "Game Installer" "Installation script not found for ${game}"
exit 1 exit 1
@ -692,6 +694,8 @@ game_removal() {
# Remove only the .sh symlink # Remove only the .sh symlink
rm -fv "${0%/*}/.launch/${gameName}.sh" | \ rm -fv "${0%/*}/.launch/${gameName}.sh" | \
ui_progressbox "Linux Game Manager" "Removing game from list..." ui_progressbox "Linux Game Manager" "Removing game from list..."
# Show success message
ui_msgbox "Linux Game Manager" "Linux Game Manager" "${gameName} has been removed from the list."
else else
# Found install path, can remove game files # Found install path, can remove game files
ui_yesno "Linux Game Manager" "Linux Game Manager" "This will remove the directory \"${gameInstallPath}\" and all of its contents. Do you want to continue?" || exit 0 ui_yesno "Linux Game Manager" "Linux Game Manager" "This will remove the directory \"${gameInstallPath}\" and all of its contents. Do you want to continue?" || exit 0
@ -699,6 +703,8 @@ game_removal() {
{ rm -rfv "${gameInstallPath}" { rm -rfv "${gameInstallPath}"
rm -fv "${0%/*}/.launch/${gameName}.sh"; rm -fv "${0%/*}/.launch/${gameName}.sh";
} | ui_progressbox "Linux Game Manager" "Removing game..." } | ui_progressbox "Linux Game Manager" "Removing game..."
# Show success message
ui_msgbox "Linux Game Manager" "Linux Game Manager" "${gameName} has been removed."
fi fi
exit 0 exit 0
} }
@ -728,11 +734,16 @@ game_update() {
open_url "https://2mb.games/product/2mb-patron/" open_url "https://2mb.games/product/2mb-patron/"
exit 0 exit 0
fi fi
# Get the game name for success message
local updateGameName="${game##*/}"
updateGameName="${updateGameName%.sh}"
source "${game}" source "${game}"
else else
exit 0 exit 0
fi fi
run_update run_update
# Show success message
ui_msgbox "Audio Game Updater" "Audio Game Updater" "${updateGameName} has been updated."
exit 0 exit 0
} }