|
|
@ -88,13 +88,13 @@ relamove() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
menumove() {
|
|
|
|
menumove() {
|
|
|
|
if [ "$1" -lt 0 && $(($MENUPOS - $1)) -lt $MENUSIZE ]; then
|
|
|
|
if [ "$1" -lt 0 ] && [ $(($MENUPOS - $1)) -lt $MENUSIZE ]; then
|
|
|
|
printf " "
|
|
|
|
printf " "
|
|
|
|
relamove -1 $1
|
|
|
|
relamove -1 $1
|
|
|
|
printf "*"
|
|
|
|
printf "*"
|
|
|
|
relamove -1 0
|
|
|
|
relamove -1 0
|
|
|
|
MENUPOS=$(($MENUPOS - $1))
|
|
|
|
MENUPOS=$(($MENUPOS - $1))
|
|
|
|
elif [ "$1" -gt 0 && $(($MENUPOS - $1)) -ge 0 ]; then
|
|
|
|
elif [ "$1" -gt 0 ] && [ $(($MENUPOS - $1)) -ge 0 ]; then
|
|
|
|
printf " "
|
|
|
|
printf " "
|
|
|
|
relamove -1 $1
|
|
|
|
relamove -1 $1
|
|
|
|
printf "*"
|
|
|
|
printf "*"
|
|
|
@ -132,9 +132,9 @@ split_ls2() {
|
|
|
|
drawmenu() {
|
|
|
|
drawmenu() {
|
|
|
|
# initialize menu only. too expensize to do each time
|
|
|
|
# initialize menu only. too expensize to do each time
|
|
|
|
IFS="|"
|
|
|
|
IFS="|"
|
|
|
|
if [ "$1" = "Back" && "$(length $MENUSTACK)" -gt 1 ]; then
|
|
|
|
if [ "$1" = "Back" ] && [ "$(length $MENUSTACK)" -gt 1 ]; then
|
|
|
|
deleteFirst $MENUSTACK
|
|
|
|
deleteFirst $MENUSTACK
|
|
|
|
elif [ $(getNth 0 "$MENUSTACK") != "$1" && "$1" != "Back" && "$MODE" = "" ]; then
|
|
|
|
elif [ $(getNth 0 "$MENUSTACK") != "$1" ] && [ "$1" != "Back" ] && [ "$MODE" = "" ]; then
|
|
|
|
addFirst $1
|
|
|
|
addFirst $1
|
|
|
|
logprint "Adding $1"
|
|
|
|
logprint "Adding $1"
|
|
|
|
logprint "State: $MENUSTACK"
|
|
|
|
logprint "State: $MENUSTACK"
|
|
|
|