diff options
author | ache <ache@ache.one> | 2017-11-17 11:21:12 +0100 |
---|---|---|
committer | ache <ache@ache.one> | 2017-11-17 11:21:12 +0100 |
commit | 20a87184b1c06f63b2b3d8b9c48a68535b31b4bb (patch) | |
tree | e3ad5a41ac00d71ef95bd58fd1c4d4bf3eaa07a7 /wind.c | |
parent | Number to contact option (diff) |
New mesms
Diffstat (limited to 'wind.c')
-rw-r--r-- | wind.c | 60 |
1 files changed, 60 insertions, 0 deletions
@@ -7,6 +7,8 @@ /* Managed windows */ extern int w_menuContact,h_menuContact; +extern int x_WMessage,y_WMessage; +extern int w_WMessage,h_WMessage; static short my_fg = COLOR_WHITE; static short my_bg = COLOR_BLACK; @@ -17,9 +19,67 @@ static short my_bg = COLOR_BLACK; void resize() { h_menuContact = LINES-2; w_menuContact = COLS/5-1; + + x_WMessage = w_menuContact + 2; + y_WMessage = 1; + + w_WMessage = (4*COLS)/5-2; + h_WMessage = LINES-5; + + clear(); showContactListW(); + move(1, x_WMessage-1); + vline(ACS_VLINE, h_menuContact); + showMessageWind(); + move(1,COLS/2); } +int confirmSend(char* txt, char* autheur) { + int x = COLS/3; + int y = LINES/3; + + int w = COLS/3; + int h = LINES/3; + + clear(); + move(y,x); + printw("Voulez-vous vraiment envoyé ce SMS à %s ?", autheur); + y++; + move(y,x); + + { + char line[w]; + memset(line, 0, w); + + int X = 0, Y=0, iS= 0; + while( txt[iS] ) { + X = 0; + while( X < w-1 && txt[iS]) { + if( txt[iS] == '\n' ) { + iS++; + break; + } + line[X++] = txt[iS++]; + } + line[X] = 0; + if( Y+1 >= h_WMessage -1 ) { + break; + } + Y++; + move(Y+y, x+2); + printw("%s", line); + } + } + + + + int c = 0; + while( (c = getch()) && c != EOF && !strchr("oyneqOYNEQ", c) ) ; + + clear(); + return (c == 'e' || c =='E') ? 2 : (!!strchr("yYoO", c)) ; + +} |