From 2fc6cc22a29a53dc5127eafa2719d11e9bb38c42 Mon Sep 17 00:00:00 2001 From: Ian C Date: Thu, 22 Jan 2004 02:38:13 +0000 Subject: Updated with various bits from espec (memory menu, GUI, etc) --- src/gui.h | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'src/gui.h') diff --git a/src/gui.h b/src/gui.h index 4f03394..3744739 100644 --- a/src/gui.h +++ b/src/gui.h @@ -33,10 +33,20 @@ /* ---------------------------------------- INTERFACES */ +/* Message types +*/ +typedef enum {eMessageBox, eYesNoBox} GUIBoxType; + /* Display a simple message box. A message of longer than 1024 bytes causes - undefined behaviour. Newlines cause a line break. + undefined behaviour. Newlines cause a line break. If a line is over 38 + characters then it will be truncated. + + If type is eYesNoBox then TRUE/FALSE is returned depending on whether + yes/no was selected. */ -void GUIMessage(const char *title, const char *format,...); +int GUIMessage(GUIBoxType type, + const char *title, + const char *format,...); /* Enter a string, max 40 characters @@ -44,6 +54,20 @@ void GUIMessage(const char *title, const char *format,...); const char *GUIInputString(const char *prompt, const char *orig); +/* Selects an entry from a list. Returns the index selected, or + -1 if cancelled. +*/ +int GUIListSelect(const char *title, int no, char * const list[]); + + +/* Allows options to be toggled in a list. Returns FALSE for cancelled (in + which case option will be as it was. TRUE if accepted, and option will be + updated. +*/ +int GUIListOption(const char *title, + int no, char * const list[], int option[]); + + #endif -- cgit v1.2.3