mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-22 21:33:02 +01:00
fixed cursor
This commit is contained in:
parent
6405632b49
commit
c4f31e4646
9
main.c
9
main.c
@ -280,6 +280,14 @@ void prepare_window(WINDOW* w) {
|
|||||||
wresize(w, LINES-2, COLS);
|
wresize(w, LINES-2, COLS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Draws cursor relative to input */
|
||||||
|
void position_cursor(WINDOW* w)
|
||||||
|
{
|
||||||
|
int x, y;
|
||||||
|
getyx(w, y, x);
|
||||||
|
move(y, x);
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
int ch;
|
int ch;
|
||||||
ToxWindow* a;
|
ToxWindow* a;
|
||||||
@ -299,6 +307,7 @@ int main(int argc, char* argv[]) {
|
|||||||
a->blink = false;
|
a->blink = false;
|
||||||
a->onDraw(a);
|
a->onDraw(a);
|
||||||
draw_bar();
|
draw_bar();
|
||||||
|
position_cursor(a->window);
|
||||||
|
|
||||||
// Handle input.
|
// Handle input.
|
||||||
ch = getch();
|
ch = getch();
|
||||||
|
Loading…
Reference in New Issue
Block a user