Make titles in map screen a little nicer.

This commit is contained in:
Storm Dragon 2024-08-29 02:28:04 -04:00
parent 376d4158b3
commit 4179dc6392

27
.scripts/TobyCustom/.mapmenu Executable file
View File

@ -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