Make the ui more consistant and less verbose.

This commit is contained in:
Storm Dragon 2020-07-07 17:57:46 -04:00
parent c73e4e613e
commit 0aecfda4ad

View File

@ -30,7 +30,7 @@ inputbox() {
# Returns: text entered by the user
# Args 1, Instructions for box.
# args: 2 initial text (optional)
dialog --backtitle "$(gettext "Enter text and press enter.")" \
dialog --backtitle "Stormux" \
--clear \
--inputbox "$1" 0 0 "$2" --stdout
}
@ -39,7 +39,7 @@ passwordbox() {
# Returns: text entered by the user
# Args 1, Instructions for box.
# args: 2 initial text (optional)
dialog --backtitle "$(gettext "Enter text and press enter.")" \
dialog --backtitle "Stormux" \
--clear \
--passwordbox "$1" 0 0 "$2" --stdout
}
@ -65,7 +65,7 @@ yesno() {
# Args: Question to user.
# Called in if $(yesno) == "Yes"
# Or variable=$(yesno)
dialog --clear --backtitle "$(gettext "Press 'Enter' for \"yes\" or 'Escape' for \"no\".")" --yesno "$*" 10 80 --stdout
dialog --clear --backtitle "Stormux" --yesno "$*" 10 80 --stdout
if [[ $? -eq 0 ]]; then
echo "Yes"
else
@ -80,7 +80,7 @@ menulist() {
for i in "${@}" ; do
menuList+=("$i" "$i")
done
dialog --backtitle "Use the up and down arrow keys to find the option you want, then press enter to select it." \
dialog --backtitle "Stormux" \
--clear \
--no-tags \
--menu "Please select an option" 0 0 0 ${menuList[@]} --stdout