#!/usr/bin/env bash
# winezgui-template-help
winezgui-template-help()
{
  
  SOURCE "script-check-variables-loaded-or-not"
  script-check-variables-loaded-or-not
  dbug "I: $(basename ${0}): Launched ${FUNCNAME[0]}"
  HELP_TEXT+="Configure ${TEMPLATE_NAME}... : Configure ${TEMPLATE_NAME} prefix template with any Setup or winetricks!|"
  HELP_TEXT+="Backup    ${TEMPLATE_NAME}... : Backup ${TEMPLATE_NAME} prefix template  as template backup.|"
  HELP_TEXT+="Download  Template...         : Download WineZGUI-UE4 template, supports Unreal Engine 4 games, has mf-install.|"
  HELP_TEXT+="Create New...                 : Create a new template prefix to be used by newly created prefix scripts.|"
  HELP_TEXT+="Clone...                      : Copy an existing template.|"
  HELP_TEXT+="Change...                     : Set Template as default template to create new app/game prefixes.|"
  HELP_TEXT+="Backup...                     : Backup a prefix template from a list of available templates. |"
  HELP_TEXT+="Restore...                    : Restore a previously backed up template|"
  HELP_TEXT+="Delete...                     : Delete a Prefix Template|"
  
  # Text is more, so we need to format it, with sed in pango markup
  unset TEXT
  TEXT="$(echo ${HELP_TEXT} \
              |tr "|" "\n" \
              |sed "s/https:/https|/g" \
              |sed -E "s/([0-9]):([0-9])/\1|\2/g" \
              |sed "s/:/;:;/g" \
              |column -t -s ";"      \
              |sed -E "s/^(.*:)/<tt><b>\1<\/b><\/tt>/" \
              |sed -E "s/^(.*)$/<small>\1<\/small>/" \
              |sed "s/|/:/g" )"
              
  #
  ${ZENITY_CMD} --info --no-wrap --text "${TEXT}" --title "${APP_WITH_VER} - Help!"
  unset HELP_TEXT
  unset TEXT
}
