center cursor directly in Menu class

centering in Screen::Scroll is hacky and works
only for scrolling, not e.g. selecting.
This commit is contained in:
Andrzej Rybczak
2010-02-05 15:49:20 +01:00
parent e40ced8daf
commit bd64052f11
11 changed files with 33 additions and 17 deletions

View File

@@ -64,6 +64,7 @@ void SearchEngine::Init()
w = new Menu< std::pair<Buffer *, MPD::Song *> >(0, MainStartY, COLS, MainHeight, "", Config.main_color, brNone);
w->HighlightColor(Config.main_highlight_color);
w->CyclicScrolling(Config.use_cyclic_scrolling);
w->CenteredCursor(Config.centered_cursor);
w->SetItemDisplayer(Display::SearchEngine);
w->SetSelectPrefix(&Config.selected_item_prefix);
w->SetSelectSuffix(&Config.selected_item_suffix);