From b6d761f67efd66563ce90c4a51152dbc1800b5b3 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sun, 21 Jan 2024 13:48:58 -0500 Subject: [PATCH] Add dialogs for death match setup. --- .scripts/FreeDoom.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.scripts/FreeDoom.sh b/.scripts/FreeDoom.sh index 44c6243..ab70b30 100755 --- a/.scripts/FreeDoom.sh +++ b/.scripts/FreeDoom.sh @@ -30,7 +30,6 @@ grepStrings=( '-e' '^"cl_run"' '-e' '^Game saved. ' '-e' '^A secret is revealed!$' - '-e' '^MAP[0-9]*' '-e' '^Player[: ]' '-e' '^Please select a game wad \(or 0 to exit\):' '-e' '^You have no keys in your pocket!$' @@ -39,7 +38,6 @@ grepStrings=( sedStrings=( '-e' 's/"cl_run" = "true"/run/' '-e' 's/"cl_run" = "false"/walk/' - '-e' 's/MAP0\([1-9]\)/Map \1/' '-e' 's:.*/:Game saved. (:' ) @@ -100,10 +98,18 @@ case ${buttonCode} in [6]="2 4" [7]="2 4" [8]="2 4") - # Dialog statement to choose map goes here - map="1" - # Dialog statement to choose fraglimit goes here - fraglimit=20 + map="$(dialog --backtitle "Select Map" \ + --clear \ + --no-tags \ + --cancel-label "Exit" \ + --ok-label "Host" \ + --menu "Please select one" 0 0 0 "${maps[@]}" --stdout)" + fraglimit="$(dialog --backtitle "Fraglimit" \ + --clear \ + --ok-label "Next" \ + --cancel-label "Exit" \ + --rangebox "Select Fraglimit" -1 -1 1 1000000 20 --stdout)" + [[ $? -eq 1 ]] && exit 0 # Get ip address yourIpAddress="$(curl -4s https://icanhazip.com)" players="$(dialog --backtitle "Host Deathmatch Game" \