Skip to content

Commit

Permalink
UI: Add tags to all the scroll views.
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownbrackets committed Jan 23, 2016
1 parent 1c2ac79 commit c0238de
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions UI/ControlMappingScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ void ControlMappingScreen::CreateViews() {
AddStandardBack(leftColumn);

rightScroll_ = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(1.0f));
rightScroll_->SetTag("ControlMapping");
rightScroll_->SetScrollToTop(false);
LinearLayout *rightColumn = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(1.0f));
rightScroll_->Add(rightColumn);
Expand Down
1 change: 1 addition & 0 deletions UI/CwCheatScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ void CwCheatScreen::CreateViews() {
leftColumn->Add(new PopupSliderChoice(&g_Config.iCwCheatRefreshRate, 1, 1000, cw->T("Refresh Rate"), 1, screenManager()));

ScrollView *rightScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(0.5f));
rightScroll->SetTag("CwCheats");
rightScroll->SetScrollToTop(false);
LinearLayout *rightColumn = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(200, FILL_PARENT, actionMenuMargins));
LayoutParams *layout = new LayoutParams(500, 50, LP_PLAIN);
Expand Down
7 changes: 7 additions & 0 deletions UI/DevScreens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ void SystemInfoScreen::CreateViews() {

root_->Add(tabHolder);
ViewGroup *deviceSpecsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
deviceSpecsScroll->SetTag("DevSystemInfoDeviceSpecs");
LinearLayout *deviceSpecs = new LinearLayout(ORIENT_VERTICAL);
deviceSpecs->SetSpacing(0);
deviceSpecsScroll->Add(deviceSpecs);
Expand Down Expand Up @@ -408,6 +409,7 @@ void SystemInfoScreen::CreateViews() {
#endif

ViewGroup *cpuExtensionsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
cpuExtensionsScroll->SetTag("DevSystemInfoCPUExt");
LinearLayout *cpuExtensions = new LinearLayout(ORIENT_VERTICAL);
cpuExtensions->SetSpacing(0);
cpuExtensionsScroll->Add(cpuExtensions);
Expand All @@ -422,6 +424,7 @@ void SystemInfoScreen::CreateViews() {
}

ViewGroup *oglExtensionsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
oglExtensionsScroll->SetTag("DevSystemInfoOGLExt");
LinearLayout *oglExtensions = new LinearLayout(ORIENT_VERTICAL);
oglExtensions->SetSpacing(0);
oglExtensionsScroll->Add(oglExtensions);
Expand Down Expand Up @@ -450,6 +453,7 @@ void SystemInfoScreen::CreateViews() {
// If there aren't any EGL extensions, no need to show the tab.
if (exts.size() > 0) {
ViewGroup *eglExtensionsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
eglExtensionsScroll->SetTag("DevSystemInfoEGLExt");
LinearLayout *eglExtensions = new LinearLayout(ORIENT_VERTICAL);
eglExtensions->SetSpacing(0);
eglExtensionsScroll->Add(eglExtensions);
Expand Down Expand Up @@ -567,10 +571,12 @@ void JitCompareScreen::CreateViews() {

ScrollView *midColumnScroll = root_->Add(new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(2.0f)));
LinearLayout *midColumn = midColumnScroll->Add(new LinearLayout(ORIENT_VERTICAL));
midColumn->SetTag("JitCompareLeftDisasm");
leftDisasm_ = midColumn->Add(new LinearLayout(ORIENT_VERTICAL));
leftDisasm_->SetSpacing(0.0f);

ScrollView *rightColumnScroll = root_->Add(new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(2.0f)));
rightColumnScroll->SetTag("JitCompareRightDisasm");
LinearLayout *rightColumn = rightColumnScroll->Add(new LinearLayout(ORIENT_VERTICAL));
rightDisasm_ = rightColumn->Add(new LinearLayout(ORIENT_VERTICAL));
rightDisasm_->SetSpacing(0.0f);
Expand Down Expand Up @@ -851,6 +857,7 @@ void ShaderViewScreen::CreateViews() {
layout->Add(new TextView(gpu->DebugGetShaderString(id_, type_, SHADER_STRING_SHORT_DESC)));

ScrollView *scroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(1.0));
scroll->SetTag("DevShaderView");
layout->Add(scroll);

LinearLayout *lineLayout = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
Expand Down
7 changes: 7 additions & 0 deletions UI/GameSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ void GameSettingsScreen::CreateViews() {

// Graphics
ViewGroup *graphicsSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
graphicsSettingsScroll->SetTag("GameSettingsGraphics");
LinearLayout *graphicsSettings = new LinearLayout(ORIENT_VERTICAL);
graphicsSettings->SetSpacing(0);
graphicsSettingsScroll->Add(graphicsSettings);
Expand Down Expand Up @@ -333,6 +334,7 @@ void GameSettingsScreen::CreateViews() {

// Audio
ViewGroup *audioSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
audioSettingsScroll->SetTag("GameSettingsAudio");
LinearLayout *audioSettings = new LinearLayout(ORIENT_VERTICAL);
audioSettings->SetSpacing(0);
audioSettingsScroll->Add(audioSettings);
Expand Down Expand Up @@ -367,6 +369,7 @@ void GameSettingsScreen::CreateViews() {

// Control
ViewGroup *controlsSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
controlsSettingsScroll->SetTag("GameSettingsControls");
LinearLayout *controlsSettings = new LinearLayout(ORIENT_VERTICAL);
controlsSettings->SetSpacing(0);
controlsSettingsScroll->Add(controlsSettings);
Expand Down Expand Up @@ -455,6 +458,7 @@ void GameSettingsScreen::CreateViews() {
controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fAnalogLimiterDeadzone, 0.0f, 1.0f, co->T("Analog Limiter"), 0.10f, screenManager(), "/ 1.0"));

ViewGroup *networkingSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
networkingSettingsScroll->SetTag("GameSettingsNetworking");
LinearLayout *networkingSettings = new LinearLayout(ORIENT_VERTICAL);
networkingSettings->SetSpacing(0);
networkingSettingsScroll->Add(networkingSettings);
Expand All @@ -475,6 +479,7 @@ void GameSettingsScreen::CreateViews() {
networkingSettings->Add(new ChoiceWithValueDisplay(&g_Config.sMACAddress, n->T("Change Mac Address"), nullptr))->OnClick.Handle(this, &GameSettingsScreen::OnChangeMacAddress);

ViewGroup *toolsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
toolsScroll->SetTag("GameSettingsTools");
LinearLayout *tools = new LinearLayout(ORIENT_VERTICAL);
tools->SetSpacing(0);
toolsScroll->Add(tools);
Expand All @@ -488,6 +493,7 @@ void GameSettingsScreen::CreateViews() {

// System
ViewGroup *systemSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
systemSettingsScroll->SetTag("GameSettingsSystem");
LinearLayout *systemSettings = new LinearLayout(ORIENT_VERTICAL);
systemSettings->SetSpacing(0);
systemSettingsScroll->Add(systemSettings);
Expand Down Expand Up @@ -1014,6 +1020,7 @@ UI::EventReturn GameSettingsScreen::OnSysInfo(UI::EventParams &e) {
void DeveloperToolsScreen::CreateViews() {
using namespace UI;
root_ = new ScrollView(ORIENT_VERTICAL);
root_->SetTag("DevToolsSettings");

I18NCategory *di = GetI18NCategory("Dialog");
I18NCategory *dev = GetI18NCategory("Developer");
Expand Down
5 changes: 5 additions & 0 deletions UI/MainScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@ void MainScreen::CreateViews() {

if (g_Config.iMaxRecent > 0) {
ScrollView *scrollRecentGames = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
scrollRecentGames->SetTag("MainScreenRecentGames");
GameBrowser *tabRecentGames = new GameBrowser(
"!RECENT", false, &g_Config.bGridView1, "", "", 0,
new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
Expand All @@ -727,7 +728,9 @@ void MainScreen::CreateViews() {

if (System_GetPermissionStatus(SYSTEM_PERMISSION_STORAGE) == PERMISSION_STATUS_GRANTED) {
ScrollView *scrollAllGames = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
scrollAllGames->SetTag("MainScreenAllGames");
ScrollView *scrollHomebrew = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
scrollHomebrew->SetTag("MainScreenHomebrew");

GameBrowser *tabAllGames = new GameBrowser(g_Config.currentDirectory, true, &g_Config.bGridView2,
mm->T("How to get games"), "http://www.ppsspp.org/getgames.html", 0,
Expand Down Expand Up @@ -1130,6 +1133,7 @@ void UmdReplaceScreen::CreateViews() {

if (g_Config.iMaxRecent > 0) {
ScrollView *scrollRecentGames = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
scrollRecentGames->SetTag("UmdReplaceRecentGames");
GameBrowser *tabRecentGames = new GameBrowser(
"!RECENT", false, &g_Config.bGridView1, "", "", 0,
new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
Expand All @@ -1139,6 +1143,7 @@ void UmdReplaceScreen::CreateViews() {
tabRecentGames->OnHoldChoice.Handle(this, &UmdReplaceScreen::OnGameSelected);
}
ScrollView *scrollAllGames = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
scrollAllGames->SetTag("UmdReplaceAllGames");

GameBrowser *tabAllGames = new GameBrowser(g_Config.currentDirectory, true, &g_Config.bGridView2,
mm->T("How to get games"), "http://www.ppsspp.org/getgames.html", 0,
Expand Down
2 changes: 2 additions & 0 deletions UI/SavedataScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,14 @@ void SavedataScreen::CreateViews() {
TabHolder *tabs = new TabHolder(ORIENT_HORIZONTAL, 64, new LinearLayoutParams(FILL_PARENT, FILL_PARENT, 1.0f));
tabs->SetTag("Savedata");
ScrollView *scroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
scroll->SetTag("SavedataBrowser");
browser_ = scroll->Add(new SavedataBrowser(savedata_dir, new LayoutParams(FILL_PARENT, FILL_PARENT)));
browser_->OnChoice.Handle(this, &SavedataScreen::OnSavedataButtonClick);

tabs->AddTab(sa->T("Save Data"), scroll);

ScrollView *scroll2 = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
scroll2->SetTag("SavedataStatesBrowser");
SavedataBrowser *browser2 = scroll2->Add(new SavedataBrowser(savestate_dir));
browser2->OnChoice.Handle(this, &SavedataScreen::OnSavedataButtonClick);
tabs->AddTab(sa->T("Save States"), scroll2);
Expand Down
2 changes: 2 additions & 0 deletions UI/Store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ void StoreScreen::CreateViews() {
} else {
content = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT, 1.0f));
ScrollView *leftScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(WRAP_CONTENT, FILL_PARENT, 0.4f));
leftScroll->SetTag("StoreMainList");
content->Add(leftScroll);
LinearLayout *scrollItemView = new LinearLayout(ORIENT_VERTICAL, new LayoutParams(FILL_PARENT, WRAP_CONTENT));
leftScroll->Add(scrollItemView);
Expand All @@ -411,6 +412,7 @@ void StoreScreen::CreateViews() {

// TODO: Similar apps, etc etc
productPanel_ = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(0.5f));
leftScroll->SetTag("StoreMainProduct");
content->Add(productPanel_);
}
root_->Add(content);
Expand Down
1 change: 1 addition & 0 deletions UI/TiltAnalogSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ void TiltAnalogSettingsScreen::CreateViews() {
I18NCategory *di = GetI18NCategory("Dialog");

root_ = new ScrollView(ORIENT_VERTICAL);
root_->SetTag("TiltAnalogSettings");

LinearLayout *settings = new LinearLayout(ORIENT_VERTICAL);

Expand Down

0 comments on commit c0238de

Please sign in to comment.