xmessage can have multiple buttons and output the exit code based on
what button was activated. Open a xterm (or konsole, or gnome-terminal
or what ever you use) and type "man xmessage".

As for text UI. It might be good to have a conditional area that
checks if X11 is running, and if not run a dialog based script.
However, if you want to do more then somthing like "ls | xmessage
-center" and have a couple of buttons at the bottom, look for somthing
else.