diff options
author | Sean Qureshi <stqism@risingstormgames.com> | 2013-08-02 22:31:21 -0700 |
---|---|---|
committer | Sean Qureshi <stqism@risingstormgames.com> | 2013-08-02 22:31:21 -0700 |
commit | 97fbdea304a24b0a4354c8d9cb0157f3eba2978e (patch) | |
tree | 04bb92fa9725201a346282f71c33b455ad79c46f /testing/toxic/main.c | |
parent | 62bf320b6e3cb946cc70a972c35c114b0bcdbad1 (diff) | |
parent | 8fa074db5eb8c9b0ea9497d269725df0ff391321 (diff) |
Merge https://github.com/JFreegman/ProjectTox-Core
Diffstat (limited to 'testing/toxic/main.c')
-rw-r--r-- | testing/toxic/main.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/testing/toxic/main.c b/testing/toxic/main.c index c596b708..bcfc487f 100644 --- a/testing/toxic/main.c +++ b/testing/toxic/main.c | |||
@@ -280,26 +280,6 @@ void prepare_window(WINDOW* w) { | |||
280 | wresize(w, LINES-2, COLS); | 280 | wresize(w, LINES-2, COLS); |
281 | } | 281 | } |
282 | 282 | ||
283 | /* | ||
284 | * Draws cursor relative to input on prompt window. | ||
285 | * Removes cursor on friends window and chat windows. | ||
286 | * | ||
287 | * TODO: Make it work for chat windows | ||
288 | */ | ||
289 | void position_cursor(WINDOW* w, char* title) | ||
290 | { | ||
291 | curs_set(1); | ||
292 | if (strcmp(title, "[prompt]") == 0) { // main/prompt window | ||
293 | int x, y; | ||
294 | getyx(w, y, x); | ||
295 | move(y, x); | ||
296 | } | ||
297 | else if (strcmp(title, "[friends]") == 0) // friends window | ||
298 | curs_set(0); | ||
299 | else // any other window (i.e chat) | ||
300 | curs_set(0); | ||
301 | } | ||
302 | |||
303 | int main(int argc, char* argv[]) { | 283 | int main(int argc, char* argv[]) { |
304 | int ch; | 284 | int ch; |
305 | ToxWindow* a; | 285 | ToxWindow* a; |
@@ -317,9 +297,8 @@ int main(int argc, char* argv[]) { | |||
317 | a = &windows[w_active]; | 297 | a = &windows[w_active]; |
318 | prepare_window(a->window); | 298 | prepare_window(a->window); |
319 | a->blink = false; | 299 | a->blink = false; |
320 | a->onDraw(a); | ||
321 | draw_bar(); | 300 | draw_bar(); |
322 | position_cursor(a->window, a->title); | 301 | a->onDraw(a); |
323 | 302 | ||
324 | // Handle input. | 303 | // Handle input. |
325 | ch = getch(); | 304 | ch = getch(); |