mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Moved main.c to maaster
This commit is contained in:
parent
2b916b96bd
commit
ece3407c55
|
@ -250,6 +250,7 @@ static void load_data(char *path)
|
||||||
static void draw_bar()
|
static void draw_bar()
|
||||||
{
|
{
|
||||||
static int odd = 0;
|
static int odd = 0;
|
||||||
|
int blinkrate = 30;
|
||||||
|
|
||||||
attron(COLOR_PAIR(4));
|
attron(COLOR_PAIR(4));
|
||||||
mvhline(LINES - 2, 0, '_', COLS);
|
mvhline(LINES - 2, 0, '_', COLS);
|
||||||
|
@ -267,14 +268,13 @@ static void draw_bar()
|
||||||
if (i == active_window)
|
if (i == active_window)
|
||||||
attron(A_BOLD);
|
attron(A_BOLD);
|
||||||
|
|
||||||
odd = (odd+1) % 10;
|
odd = (odd+1) % blinkrate;
|
||||||
if (windows[i].blink && (odd < 5)) {
|
if (windows[i].blink && (odd < (blinkrate/2))) {
|
||||||
attron(COLOR_PAIR(3));
|
attron(COLOR_PAIR(3));
|
||||||
}
|
}
|
||||||
|
|
||||||
printw(" %s", windows[i].title);
|
printw(" %s", windows[i].title);
|
||||||
if (windows[i].blink && (odd < 5)) {
|
if (windows[i].blink && (odd < (blinkrate/2))) {
|
||||||
attron(COLOR_PAIR(3));
|
attroff(COLOR_PAIR(3));
|
||||||
}
|
}
|
||||||
if (i == active_window) {
|
if (i == active_window) {
|
||||||
attroff(A_BOLD);
|
attroff(A_BOLD);
|
||||||
|
@ -376,9 +376,8 @@ int main(int argc, char *argv[])
|
||||||
ch = getch();
|
ch = getch();
|
||||||
if (ch == '\t' || ch == KEY_BTAB)
|
if (ch == '\t' || ch == KEY_BTAB)
|
||||||
set_active_window(ch);
|
set_active_window(ch);
|
||||||
else if (ch != ERR) {
|
else if (ch != ERR)
|
||||||
a->onKey(a, ch);
|
a->onKey(a, ch);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user