From 4179dc639277cc7ea25bdf571b8316c1c71b3f84 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Thu, 29 Aug 2024 02:28:04 -0400 Subject: [PATCH] Make titles in map screen a little nicer. --- .scripts/TobyCustom/.mapmenu | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 .scripts/TobyCustom/.mapmenu diff --git a/.scripts/TobyCustom/.mapmenu b/.scripts/TobyCustom/.mapmenu new file mode 100755 index 0000000..51283a1 --- /dev/null +++ b/.scripts/TobyCustom/.mapmenu @@ -0,0 +1,27 @@ +# Choice of maps +mapList=( + "${gamePath}/OpMDK.wad" + "${gamePath}/TobyDoomLevels.wad" + "${gamePath}/Toby-Demo-Level.wad" +) + +declare -a mapMenu=('none' 'None') +for i in "${mapList[@]}" ; do + if [[ -e "$i" ]]; then + title="${i##*/}" + title="${title%.*}" + title="${title/OpMDK/Operation MDK}" + title="${title/-/ }" + mapMenu+=("$i" "$title") + fi +done +map="$(dialog --backtitle "Select Map" \ + --clear \ + --no-tags \ + --cancel-label "Exit" \ + --ok-label "Next" \ + --menu "Please select one" 0 0 0 "${mapMenu[@]}" --stdout)" +[[ $? -ne 0 ]] && exit 0 +if [[ "${map}" != "none" ]]; then + gameOption=("$map" "${gameOption[@]}") +fi