Non-working menu.
This commit is contained in:
parent
e812e45134
commit
a9be38ea09
27
game-menu.sh
Executable file
27
game-menu.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
export DIALOGOPTS='--no-lines --visit-items'
|
||||
cols=$(tput cols)
|
||||
lines=$(tput lines)
|
||||
path="$(realpath "$0")"
|
||||
path="${path%/*}"
|
||||
declare -A gameList
|
||||
for i in $path/*/ ; do
|
||||
i="${i::-1}"
|
||||
gameList[${i##*/}]="$i"
|
||||
done
|
||||
gameList[exit]="Exit"
|
||||
while : ; do
|
||||
game="$(dialog --backtitle "Storm Games" \
|
||||
--menu "Select A Game" $((lines - 5)) $cols $((lines / 2)) $(
|
||||
for i in ${!gameList[@]} ; do
|
||||
echo "$i"
|
||||
echo '|'
|
||||
done) --stdout)"
|
||||
if [[ "$game" != "exit" && -n "$game" ]]; then
|
||||
eval "${gameList[$game]}"
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
exit 0
|
BIN
soxsynth.tar.gz
BIN
soxsynth.tar.gz
Binary file not shown.
BIN
yahtzee.tar.gz
BIN
yahtzee.tar.gz
Binary file not shown.
Loading…
Reference in New Issue
Block a user