Added ListOverlay::SetSelectedIndex

This commit is contained in:
casey langen 2016-12-27 19:06:57 -08:00
parent a2d95a6698
commit 76fbc5e6bd
2 changed files with 6 additions and 0 deletions

View File

@ -107,6 +107,11 @@ ListOverlay& ListOverlay::SetAdapter(IScrollAdapterPtr adapter) {
return *this;
}
ListOverlay& ListOverlay::SetSelectedIndex(size_t index) {
this->listWindow->SetSelectedIndex(index);
return *this;
}
ListOverlay& ListOverlay::SetItemSelectedCallback(ItemSelectedCallback cb) {
this->itemSelectedCallback = cb;
return *this;

View File

@ -56,6 +56,7 @@ namespace cursespp {
ListOverlay& SetTitle(const std::string& title);
ListOverlay& SetAdapter(IScrollAdapterPtr adapter);
ListOverlay& SetItemSelectedCallback(ItemSelectedCallback cb);
ListOverlay& SetSelectedIndex(size_t index);
virtual void Layout();
virtual bool KeyPress(const std::string& key);