Skip to content

Commit c02e511

Browse files
author
ron.record
committed
Add animation menu entry to apps and games menus
1 parent 0ef4e19 commit c02e511

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

bin/asciiville

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,6 +1522,7 @@ show_games_menu() {
15221522
printf "\n\n\n"
15231523
main_menu=
15241524
art_menu=
1525+
animation_menu=
15251526
while true; do
15261527
clearscreen=1
15271528
[ "${COMMAND}" ] || COMMAND=tetris
@@ -1598,6 +1599,7 @@ show_games_menu() {
15981599
options+=("Terminal${spaces} [${use_terminal}]")
15991600
options+=("Applications Menu [a]")
16001601
[ "${have_showascii}" ] && options+=("Ascii Art Menu [A]")
1602+
[ "${have_splash}" ] && options+=("ASCII Animations [@]")
16011603
options+=("Main Menu [m]")
16021604
options+=("Quit [q]")
16031605
select opt in "${options[@]}"; do
@@ -1618,6 +1620,10 @@ show_games_menu() {
16181620
art_menu=1
16191621
break 2
16201622
;;
1623+
"ASCII Ani"*,* | *,"ASCII Ani"* | "@",* | *,"@")
1624+
animation_menu=1
1625+
break 2
1626+
;;
16211627
"Applications Menu"*,* | *,"Applications Menu"* | "a",* | *,"a")
16221628
show_apps_menu
16231629
break 2
@@ -2035,6 +2041,9 @@ show_games_menu() {
20352041
[ "${art_menu}" ] && {
20362042
show_art_menu
20372043
}
2044+
[ "${animation_menu}" ] && {
2045+
show_animation_menu
2046+
}
20382047
[ "${main_menu}" ] && {
20392048
show_main_menu
20402049
}
@@ -2044,6 +2053,7 @@ show_apps_menu() {
20442053
tput clear
20452054
printf "\n\n\n"
20462055
main_menu=
2056+
animation_menu=
20472057
art_menu=
20482058
while true; do
20492059
clearscreen=1
@@ -2089,6 +2099,7 @@ show_apps_menu() {
20892099
done
20902100
}
20912101
options+=("Terminal${spaces} [${use_terminal}]")
2102+
[ "${have_splash}" ] && options+=("ASCII Animations [v]")
20922103
options+=("Games Menu [g]")
20932104
[ "${have_showascii}" ] && options+=("Ascii Art Menu [r]")
20942105
options+=("Main Menu [m]")
@@ -2111,6 +2122,10 @@ show_apps_menu() {
21112122
art_menu=1
21122123
break 2
21132124
;;
2125+
"ASCII Ani"*,* | *,"ASCII Ani"* | "v",* | *,"v")
2126+
animation_menu=1
2127+
break 2
2128+
;;
21142129
"Games Menu"*,* | *,"Games Menu"* | "g",* | *,"g")
21152130
show_games_menu
21162131
break 2
@@ -2122,13 +2137,13 @@ show_apps_menu() {
21222137
break
21232138
;;
21242139
"Durdraw Examples"*,* | *,"Durdraw Examples"* | "e",* | *,"e")
2125-
COMMAND="${DURDRAW} examples"
2140+
COMMAND="durdraw examples"
21262141
MTITLE="Durdraw ASCII Editor"
21272142
make_it_so
21282143
break
21292144
;;
21302145
"Durdraw"*,* | *,"Durdraw"* | "d",* | *,"d")
2131-
COMMAND=${DURDRAW}
2146+
COMMAND=durdraw
21322147
MTITLE="Durdraw ASCII Editor"
21332148
make_it_so
21342149
break
@@ -2284,6 +2299,9 @@ show_apps_menu() {
22842299
[ "${art_menu}" ] && {
22852300
show_art_menu
22862301
}
2302+
[ "${animation_menu}" ] && {
2303+
show_animation_menu
2304+
}
22872305
[ "${main_menu}" ] && {
22882306
show_main_menu
22892307
}
@@ -4059,13 +4077,7 @@ init_vars
40594077
# Without any arguments, bring up interactive dialog menu
40604078
[ $# -eq 0 ] && INTERACTIVE=1
40614079
have_aewan=$(type -p aewan)
4062-
DURDRAW=$(command -v durdraw)
4063-
[ -x ${HOME}/.local/bin/durdraw ] && DURDRAW=${HOME}/.local/bin/durdraw
4064-
if [ "${DURDRAW}" ]; then
4065-
have_durdraw=1
4066-
else
4067-
have_durdraw=
4068-
fi
4080+
have_durdraw=$(type -p durdraw)
40694081
have_btop=$(type -p btop)
40704082
if [ -x ${TOP}/share/endoh1/endoh1 ]; then
40714083
have_endo=1

0 commit comments

Comments
 (0)