diff options
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | testing/toxic/main.c | 21 |
2 files changed, 23 insertions, 2 deletions
@@ -13,7 +13,7 @@ With the rise of governmental monitoring programs, Tox aims to be an easy to use | |||
13 | 13 | ||
14 | **How to build Tox on Linux**: [YouTube video](http://www.youtube.com/watch?v=M4WXE4VKmyg)<br /> | 14 | **How to build Tox on Linux**: [YouTube video](http://www.youtube.com/watch?v=M4WXE4VKmyg)<br /> |
15 | **How to use Tox on Windows**: [YouTube video](http://www.youtube.com/watch?v=qg_j_sDb6WQ)<br /> | 15 | **How to use Tox on Windows**: [YouTube video](http://www.youtube.com/watch?v=qg_j_sDb6WQ)<br /> |
16 | **For Mac OSX read INSTALL.md** | 16 | **For Mac OSX read** [INSTALL.md](INSTALL.md) |
17 | 17 | ||
18 | ### Objectives: | 18 | ### Objectives: |
19 | 19 | ||
@@ -35,7 +35,7 @@ Keep everything really simple. | |||
35 | - [ ] Streaming media | 35 | - [ ] Streaming media |
36 | - [ ] ??? | 36 | - [ ] ??? |
37 | 37 | ||
38 | For further information, check our [To-do list](https://github.com/irungentoo/ProjectTox-Core/wiki/TODO) | 38 | For further information, check our [To-do list](http://wiki.tox.im/index.php/TODO) |
39 | 39 | ||
40 | ### Why are you doing this? There are already a bunch of free skype alternatives. | 40 | ### Why are you doing this? There are already a bunch of free skype alternatives. |
41 | The goal of this project is to create a configuration-free P2P skype | 41 | The goal of this project is to create a configuration-free P2P skype |
diff --git a/testing/toxic/main.c b/testing/toxic/main.c index cdc6dc16..c596b708 100644 --- a/testing/toxic/main.c +++ b/testing/toxic/main.c | |||
@@ -280,6 +280,26 @@ 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 | |||
283 | int main(int argc, char* argv[]) { | 303 | int main(int argc, char* argv[]) { |
284 | int ch; | 304 | int ch; |
285 | ToxWindow* a; | 305 | ToxWindow* a; |
@@ -299,6 +319,7 @@ int main(int argc, char* argv[]) { | |||
299 | a->blink = false; | 319 | a->blink = false; |
300 | a->onDraw(a); | 320 | a->onDraw(a); |
301 | draw_bar(); | 321 | draw_bar(); |
322 | position_cursor(a->window, a->title); | ||
302 | 323 | ||
303 | // Handle input. | 324 | // Handle input. |
304 | ch = getch(); | 325 | ch = getch(); |