From 2cab8b286c472f6859c611dcd2337272b68b57d9 Mon Sep 17 00:00:00 2001 From: "bradley.richins" Date: Sun, 11 Oct 2020 23:28:48 -0600 Subject: [PATCH] Portal glyph banner & Galatic Coordinate converter all features appear work! --- gui | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/gui b/gui index 1ca56c7..00ed452 100755 --- a/gui +++ b/gui @@ -36,10 +36,26 @@ if [ $HGLEN != 12 ]; then zen_error "12 (HEX) chars are required" 1 fi -HEXGLYPH=${HEXGLYPH^^} # Make string uppercase +# Make string uppercase +HEXGLYPH=${HEXGLYPH^^} echo -e "Glyph code: \e[0;94m$HEXGLYPH\e[0m" # not necessary but nice to have -GC=$(bash ./converter.sh $HEXGLYPH) -echo -e "Galatic Coordinates: \e[0;94m$GC\e[0m" # not necessary but nice to have" +CHOICE=$(zenity --list --checklist --title="Options" --text="Options" --column="Use" --column="Feature" TRUE "Banner" False "Translator") +OPTS=$(echo $CHOICE | tr "|" "\n") +for OP in $OPTS +do + if [ "$OP" == "Banner" ]; then + BANNER=1 + elif [ "$OP" == "Translator" ]; then + GC=$(bash ./converter.sh $HEXGLYPH) + echo -e "Galatic Coordinates: \e[0;94m$GC\e[0m" # not necessary but nice to have" + fi +done + +if [ "$BANNER" == 1 ]; then + SIZE=$(zenity --list --text "Select image size" --radiolist --column "Select" --column "Size" TRUE 3072x256 FALSE 1536x126 FALSE 768x64 FALSE 384x32 FALSE 192x16) + FILENAME=$(zenity --forms --title="Save" --text="Planet name" --add-entry="") + bash -c "./genimg.sh $HEXGLYPH $SIZE $FILENAME" && echo -e "Saved to \e[0;94m$FILENAME-$SIZE.png\e[0m" +fi exit 0