summaryrefslogtreecommitdiffstats
path: root/gnu/lib/libdialog/yesno.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-01-01 03:43:58 +0000
committerjkh <jkh@FreeBSD.org>1996-01-01 03:43:58 +0000
commitff9186df13d1aa41b177a5cc27eae6ebed5bff8b (patch)
tree5a29b9e618eb6168395065b6c57c1bd661a23bef /gnu/lib/libdialog/yesno.c
parent2d12b11ef801b89eb3beaa3f42ddc8e8fdac9b2e (diff)
downloadFreeBSD-src-ff9186df13d1aa41b177a5cc27eae6ebed5bff8b.zip
FreeBSD-src-ff9186df13d1aa41b177a5cc27eae6ebed5bff8b.tar.gz
Next round of changes - make dialog boxes drawable at arbitrary X,Y locations
and add selection traversal callbacks so context-sensitive behavior can even be implemented for individual menu items. These work around the two largest issues holding me back with some of my sysinstall changes.
Diffstat (limited to 'gnu/lib/libdialog/yesno.c')
-rw-r--r--gnu/lib/libdialog/yesno.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/lib/libdialog/yesno.c b/gnu/lib/libdialog/yesno.c
index 67de424..2390821 100644
--- a/gnu/lib/libdialog/yesno.c
+++ b/gnu/lib/libdialog/yesno.c
@@ -50,8 +50,8 @@ int dialog_yesno(unsigned char *title, unsigned char * prompt, int height, int w
if (height > LINES)
height = LINES;
/* center dialog box on screen */
- x = (COLS - width)/2;
- y = (LINES - height)/2;
+ x = DialogX ? DialogX : (COLS - width)/2;
+ y = DialogY ? DialogY : (LINES - height)/2;
#ifdef HAVE_NCURSES
if (use_shadow)
OpenPOWER on IntegriCloud