Only switch to active chats

This commit is contained in:
James Booth
2012-02-12 21:36:01 +00:00
parent ae84c92d23
commit cdbd0d2f0a
4 changed files with 33 additions and 12 deletions

View File

@@ -39,8 +39,16 @@ void gui_close(void)
endwin();
}
void switch_to(int i)
int is_active(int i)
{
if (strcmp(wins[i].from, "") == 0)
return FALSE;
else
return TRUE;
}
void switch_to(int i)
{
touchwin(wins[i].win);
wrefresh(wins[i].win);
curr_win = i;
@@ -64,6 +72,8 @@ void close_win(void)
// go back to console window
touchwin(wins[0].win);
wrefresh(wins[0].win);
title_bar_show("Console, type /help for help information");
}
int in_chat(void)