mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 11:54:30 +01:00
Show homebrew as a list by default, allow changing the view mode
Homebrew often has poor icons, making the names important. Also fix an issue with touch button scaling. Conflicts: Core/Config.cpp UI/MainScreen.cpp
This commit is contained in:
1 parent
2f7057eeb0
commit
e017a17dbb
7 files changed
+49
-44
No files matched your search
+15
-21
@@ -311,23 +311,27 @@ void GameBrowser::Refresh() {
|
||||
Add(new Spacer(5.0f));
|
||||
I18NCategory *m = GetI18NCategory("MainMenu");
|
||||
|
||||
LinearLayout *topBar = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
if (allowBrowsing_) {
|
||||
LinearLayout *topBar = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
Margins pathMargins(5, 0);
|
||||
topBar->Add(new TextView(path_.GetFriendlyPath().c_str(), ALIGN_VCENTER, true, new LinearLayoutParams(WRAP_CONTENT, FILL_PARENT, 1.0f, pathMargins)));
|
||||
topBar->Add(new TextView(path_.GetFriendlyPath().c_str(), ALIGN_VCENTER, true, new LinearLayoutParams(WRAP_CONTENT, FILL_PARENT, pathMargins)));
|
||||
topBar->Add(new Spacer(new LinearLayoutParams(1.0f)));
|
||||
#if defined(_WIN32) || defined(USING_QT_UI)
|
||||
topBar->Add(new Choice(m->T("Browse", "Browse...")))->OnClick.Handle(this, &GameBrowser::HomeClick);
|
||||
#else
|
||||
topBar->Add(new Choice(m->T("Home")))->OnClick.Handle(this, &GameBrowser::HomeClick);
|
||||
#endif
|
||||
ChoiceStrip *layoutChoice = topBar->Add(new ChoiceStrip(ORIENT_HORIZONTAL));
|
||||
layoutChoice->AddChoice(I_GRID);
|
||||
layoutChoice->AddChoice(I_LINES);
|
||||
layoutChoice->SetSelection(*gridStyle_ ? 0 : 1);
|
||||
layoutChoice->OnChoice.Handle(this, &GameBrowser::LayoutChange);
|
||||
Add(topBar);
|
||||
} else {
|
||||
topBar->Add(new Spacer(new LinearLayoutParams(1.0f)));
|
||||
}
|
||||
|
||||
ChoiceStrip *layoutChoice = topBar->Add(new ChoiceStrip(ORIENT_HORIZONTAL));
|
||||
layoutChoice->AddChoice(I_GRID);
|
||||
layoutChoice->AddChoice(I_LINES);
|
||||
layoutChoice->SetSelection(*gridStyle_ ? 0 : 1);
|
||||
layoutChoice->OnChoice.Handle(this, &GameBrowser::LayoutChange);
|
||||
Add(topBar);
|
||||
|
||||
if (*gridStyle_) {
|
||||
gameList_ = new UI::GridLayout(UI::GridLayoutSettings(150, 85), new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
} else {
|
||||
@@ -448,7 +452,6 @@ void MainScreen::CreateViews() {
|
||||
m->T("How to get homebrew & demos", "How to get homebrew && demos"), "http://www.ppsspp.org/gethomebrew.html",
|
||||
new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
|
||||
|
||||
scrollRecentGames->Add(tabRecentGames);
|
||||
scrollAllGames->Add(tabAllGames);
|
||||
scrollHomebrew->Add(tabHomebrew);
|
||||
@@ -464,20 +467,11 @@ void MainScreen::CreateViews() {
|
||||
tabAllGames->OnHoldChoice.Handle(this, &MainScreen::OnGameSelected);
|
||||
tabHomebrew->OnHoldChoice.Handle(this, &MainScreen::OnGameSelected);
|
||||
|
||||
|
||||
if (g_Config.recentIsos.size() > 0) {
|
||||
leftColumn->SetCurrentTab(0);
|
||||
}else{
|
||||
leftColumn->SetCurrentTab(1);
|
||||
}
|
||||
/*
|
||||
if (info) {
|
||||
texvGameIcon_ = leftColumn->Add(new TextureView(0, IS_DEFAULT, new AnchorLayoutParams(144 * 2, 80 * 2, 10, 10, NONE, NONE)));
|
||||
tvTitle_ = leftColumn->Add(new TextView(0, info->title, ALIGN_LEFT, 1.0f, new AnchorLayoutParams(10, 200, NONE, NONE)));
|
||||
tvGameSize_ = leftColumn->Add(new TextView(0, "...", ALIGN_LEFT, 1.0f, new AnchorLayoutParams(10, 250, NONE, NONE)));
|
||||
tvSaveDataSize_ = leftColumn->Add(new TextView(0, "...", ALIGN_LEFT, 1.0f, new AnchorLayoutParams(10, 290, NONE, NONE)));
|
||||
}
|
||||
*/
|
||||
|
||||
ViewGroup *rightColumn = new ScrollView(ORIENT_VERTICAL);
|
||||
LinearLayout *rightColumnItems = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
@@ -514,8 +508,8 @@ void MainScreen::CreateViews() {
|
||||
if (vertical) {
|
||||
root_ = new LinearLayout(ORIENT_VERTICAL);
|
||||
rightColumn->ReplaceLayoutParams(new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
leftColumn->ReplaceLayoutParams(new LinearLayoutParams(1.0));
|
||||
root_->Add(rightColumn);
|
||||
leftColumn->ReplaceLayoutParams(new LinearLayoutParams(1.0));
|
||||
root_->Add(rightColumn);
|
||||
root_->Add(leftColumn);
|
||||
} else {
|
||||
root_ = new LinearLayout(ORIENT_HORIZONTAL);
|
||||
@@ -714,7 +708,7 @@ GamePauseScreen::~GamePauseScreen() {
|
||||
}
|
||||
|
||||
void GamePauseScreen::CreateViews() {
|
||||
static const int NUM_SAVESLOTS = 5;
|
||||
static const int NUM_SAVESLOTS = 5;
|
||||
|
||||
using namespace UI;
|
||||
Margins actionMenuMargins(0, 100, 15, 0);
|
||||
|
||||
Reference in new issue
Block a user