mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-22 22:33:02 +01:00
changing OSX instructions in INSTALL.md to reflect how everything works
This commit is contained in:
parent
22cfcc7585
commit
cad5f61372
18
main.c
18
main.c
@ -282,7 +282,7 @@ void prepare_window(WINDOW* w) {
|
|||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
int ch;
|
int ch;
|
||||||
ToxWindow* a;
|
ToxWindow* current_window;
|
||||||
|
|
||||||
init_term();
|
init_term();
|
||||||
init_tox();
|
init_tox();
|
||||||
@ -294,22 +294,20 @@ int main(int argc, char* argv[]) {
|
|||||||
do_tox();
|
do_tox();
|
||||||
|
|
||||||
// Draw.
|
// Draw.
|
||||||
a = &windows[w_active];
|
current_window = &windows[w_active];
|
||||||
prepare_window(a->window);
|
prepare_window(current_window->window);
|
||||||
a->blink = false;
|
current_window->blink = false;
|
||||||
a->onDraw(a);
|
current_window->onDraw(current_window);
|
||||||
draw_bar();
|
draw_bar();
|
||||||
|
|
||||||
// Handle input.
|
// Handle input.
|
||||||
ch = getch();
|
ch = getch();
|
||||||
if(ch == '\t') {
|
if(ch == '\t') {
|
||||||
w_active = (w_active + 1) % w_num;
|
w_active = (w_active + 1) % w_num;
|
||||||
}
|
} else if(ch == KEY_BTAB) {
|
||||||
else if(ch == KEY_BTAB) {
|
|
||||||
w_active = (w_active + w_num - 1) % w_num;
|
w_active = (w_active + w_num - 1) % w_num;
|
||||||
}
|
} else if(ch != ERR) {
|
||||||
else if(ch != ERR) {
|
current_window->onKey(current_window, ch);
|
||||||
a->onKey(a, ch);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user