diff --git a/src/frontend.c b/src/frontend.c index 7c012cf..6003431 100644 --- a/src/frontend.c +++ b/src/frontend.c @@ -423,8 +423,8 @@ int main(int argc, char *argv[]) { } else if (fd == 0) { // process keyboard activity master_handler(state, canvas_win, status_interface->info_win); draw_collab_cursors(state); - net_update_pos(state); refresh_screen(); + net_update_pos(state); } } } @@ -449,12 +449,12 @@ void setup_colors() { // TODO: Use #define to get colors for standard uses // Assign color codes - init_pair(1, COLOR_RED, COLOR_BLACK); - init_pair(2, COLOR_GREEN, COLOR_BLACK); - init_pair(3, COLOR_BLUE, COLOR_BLACK); - init_pair(4, COLOR_CYAN, COLOR_BLACK); - init_pair(5, COLOR_MAGENTA, COLOR_BLACK); - init_pair(6, COLOR_YELLOW, COLOR_BLACK); + init_pair(1, COLOR_WHITE, COLOR_BLUE); + init_pair(2, COLOR_WHITE, COLOR_GREEN); + init_pair(3, COLOR_WHITE, COLOR_RED); + init_pair(4, COLOR_WHITE, COLOR_CYAN); + init_pair(5, COLOR_WHITE, COLOR_MAGENTA); + init_pair(6, COLOR_WHITE, COLOR_YELLOW); init_pair(7, COLOR_BLACK, COLOR_WHITE); } @@ -508,9 +508,11 @@ void draw_collab_cursors(State *state) { if (c != NULL && (c->x >= min_x && c->y <= max_x) && (c->y >= min_y && c->y <= max_y)) { logd("Drawing collab %i\n", c->uid); - // TODO: set reverse video and color at this point - if (has_colors()) { - } + const int color = has_colors() ? (i % 6) + 1 : 0; + // TODO: blink cursor with A_BLINK attribute (needs to pause between + // updates/only move on changes?) + mvwchgat(canvas_win, c->y - view->y + 1, c->x - view->x + 1, 1, 0, color, + NULL); } } } diff --git a/src/network.c b/src/network.c index bf71000..13e9582 100644 --- a/src/network.c +++ b/src/network.c @@ -139,10 +139,7 @@ void collab_list_free(collab_list_t *l) { int collab_list_add(collab_list_t *l, int uid, int y, int x) { int i; - logd("Foo\n"); - logd("list: %p\n", l); for (i = 0; i < l->len; i++) { - logd("Loop %i\n", i); if (l->list[i] == NULL) { l->list[i] = collab_create(uid, y, x); l->num++; @@ -177,9 +174,7 @@ int collab_list_del(collab_list_t *l, int uid) { int collab_list_upd(collab_list_t *l, int uid, int y, int x) { int i; - logd("foo\n"); for (i = 0; i < l->len; i++) { - logd("upd Loop: %d\n", i); if (l->list[i] != NULL && l->list[i]->uid == uid) { l->list[i]->x = x; l->list[i]->y = y;