NCurses: redraw after menu/info window is modified
This commit is contained in:
parent
310ec1f791
commit
3d00f398fe
|
@ -357,6 +357,7 @@ void NCursesUI::menu_show(const memoryview<String>& choices,
|
||||||
set_menu_fore(m_menu, COLOR_PAIR(m_menu_fg));
|
set_menu_fore(m_menu, COLOR_PAIR(m_menu_fg));
|
||||||
set_menu_back(m_menu, COLOR_PAIR(m_menu_bg));
|
set_menu_back(m_menu, COLOR_PAIR(m_menu_bg));
|
||||||
post_menu(m_menu);
|
post_menu(m_menu);
|
||||||
|
redraw(m_menu_win, m_info_win);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NCursesUI::menu_select(int selected)
|
void NCursesUI::menu_select(int selected)
|
||||||
|
@ -369,6 +370,7 @@ void NCursesUI::menu_select(int selected)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
set_menu_fore(m_menu, COLOR_PAIR(m_menu_bg));
|
set_menu_fore(m_menu, COLOR_PAIR(m_menu_bg));
|
||||||
|
redraw(m_menu_win, m_info_win);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NCursesUI::menu_hide()
|
void NCursesUI::menu_hide()
|
||||||
|
@ -385,6 +387,7 @@ void NCursesUI::menu_hide()
|
||||||
m_menu_win = nullptr;
|
m_menu_win = nullptr;
|
||||||
m_items.clear();
|
m_items.clear();
|
||||||
m_choices.clear();
|
m_choices.clear();
|
||||||
|
redraw(m_menu_win, m_info_win);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DisplayCoord compute_needed_size(const String& str)
|
static DisplayCoord compute_needed_size(const String& str)
|
||||||
|
@ -454,6 +457,7 @@ void NCursesUI::info_show(const String& content, const DisplayCoord& anchor, Men
|
||||||
wmove(m_info_win, 0, 0);
|
wmove(m_info_win, 0, 0);
|
||||||
addutf8str(m_info_win, Utf8Iterator(content.begin()),
|
addutf8str(m_info_win, Utf8Iterator(content.begin()),
|
||||||
Utf8Iterator(content.end()));
|
Utf8Iterator(content.end()));
|
||||||
|
redraw(m_menu_win, m_info_win);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NCursesUI::info_hide()
|
void NCursesUI::info_hide()
|
||||||
|
@ -462,6 +466,7 @@ void NCursesUI::info_hide()
|
||||||
return;
|
return;
|
||||||
delwin(m_info_win);
|
delwin(m_info_win);
|
||||||
m_info_win = nullptr;
|
m_info_win = nullptr;
|
||||||
|
redraw(m_menu_win, m_info_win);
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplayCoord NCursesUI::dimensions()
|
DisplayCoord NCursesUI::dimensions()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user