-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.c
More file actions
29 lines (27 loc) · 878 Bytes
/
Copy pathexample.c
File metadata and controls
29 lines (27 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "UI.h"
int main(int argc, char const *argv[])
{
utf8();
char *menu[] = {"c_ui", "", "Dialog", "Dialog with Input", "Menu"};
int option;
option = launchMenu(menu, 5, 20, 8, 45, C_F_BWHITE, C_F_BBLACK, 1, '>', 1);
switch (option)
{
case 0:
clrscr();
int dialogSelection;
char *menuDialog[] = {"Dialog", "Which option?", "", "Option A", "Option B"};
dialogSelection = launchDialog(menuDialog, 5, 20, 8, 30, C_F_BYELLOW, C_B_BBLUE, 1, C_F_MAGENTA, C_B_BWHITE, 2);
return dialogSelection;
case 1:
clrscr();
char *menuInput[] = {"Input Dialog", "", "Input: "};
char inputChar[40];
printDialog(menuInput, 3, 20, 8, 30, C_F_BLACK, C_B_WHITE, 1, 1);
scanf("%s", inputChar);
fflush(stdin);
return 0;
case 2:
main(0, ((void *)0));
}
}