mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-05 12:13:50 +01:00
Add the search bar to all main screen tabs
This commit is contained in:
1 parent
b207beb882
commit
5f7835cdfb
2 files changed
+8
-3
No files matched your search
+7
-2
@@ -166,17 +166,22 @@ GameBrowser *MainScreen::CreateBrowserTab(const Path &path, std::string_view tit
|
||||
|
||||
const bool portrait = GetDeviceOrientation() == DeviceOrientation::Portrait;
|
||||
|
||||
ScrollView *scrollView = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
LinearLayout *tabContainer = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
SearchBar *search = tabContainer->Add(new SearchBar(new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)));
|
||||
|
||||
ScrollView *scrollView = tabContainer->Add(new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)));
|
||||
scrollView->SetTag(title); // Re-use title as tag, should be fine.
|
||||
|
||||
GameBrowser *gameBrowser = new GameBrowser(GetRequesterToken(), path, browseFlags, portrait, bGridView, screenManager(),
|
||||
mm->T(howToTitle), howToUri,
|
||||
new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
|
||||
gameBrowser->SetSearchBar(search);
|
||||
|
||||
scrollView->Add(gameBrowser);
|
||||
gameBrowsers_.push_back(gameBrowser);
|
||||
|
||||
tabHolder_->AddTab(mm->T(title), ImageID::invalid(), scrollView);
|
||||
tabHolder_->AddTab(mm->T(title), ImageID::invalid(), tabContainer);
|
||||
if (scrollPos) {
|
||||
scrollView->RememberPosition(scrollPos);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user