cursor bug fixed

This commit is contained in:
Tristan Krause 2019-05-15 14:40:30 +02:00
parent 8e196c79eb
commit 42e6a6d12d
3 changed files with 4 additions and 4 deletions

View file

@ -60,6 +60,7 @@ void View::repaint()
start_x = floor((size.ws_col - width) / 2.); start_x = floor((size.ws_col - width) / 2.);
start_y = floor((size.ws_row - height) / 2.); start_y = floor((size.ws_row - height) / 2.);
curs_set(0); // hide cursor
mvwin(win, start_y, start_x); mvwin(win, start_y, start_x);
clear(); clear();
wclear(win); wclear(win);

View file

@ -2,7 +2,7 @@
void ViewPromt::draw() void ViewPromt::draw()
{ {
curs_set(2); // show cursor curs_set(1); // show cursor
int li = text_offset_y; int li = text_offset_y;
int ci = 0; int ci = 0;
@ -107,7 +107,6 @@ std::function<void(int)> ViewPromt::keypress(int& key)
key = -1; // do return from view key = -1; // do return from view
else else
ret = call_confirm; ret = call_confirm;
curs_set(0); // hide cursor again
break; break;
default: default:
break; break;
@ -117,6 +116,6 @@ std::function<void(int)> ViewPromt::keypress(int& key)
input += (char) key; input += (char) key;
if(key != KEY_ENT) if(key != KEY_ENT)
repaint(); repaint();
return ret; return ret;
} }

View file

@ -2,7 +2,7 @@
void ViewSelection::draw() void ViewSelection::draw()
{ {
//curs_set(0); // hide cursor
for(size_t i = 0; i < choices.size(); i++) for(size_t i = 0; i < choices.size(); i++)
{ {
if(selection == i) if(selection == i)