From 84d815768ba194a102009c9adbeb46234df598a1 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Fri, 22 Jan 2016 22:38:21 -0800 Subject: [PATCH] UI: Set tags on tab views, in the typical case. --- UI/DevScreens.cpp | 2 ++ UI/GameSettingsScreen.cpp | 1 + UI/MainScreen.cpp | 2 ++ UI/SavedataScreen.cpp | 1 + UI/TouchControlLayoutScreen.cpp | 1 + 5 files changed, 7 insertions(+) diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp index fc3bdd52df..3eb90f45b3 100644 --- a/UI/DevScreens.cpp +++ b/UI/DevScreens.cpp @@ -326,6 +326,7 @@ void SystemInfoScreen::CreateViews() { AddStandardBack(root_); TabHolder *tabHolder = new TabHolder(ORIENT_VERTICAL, 225, new AnchorLayoutParams(10, 0, 10, 0, false)); + tabHolder->SetTag("DevSystemInfo"); root_->Add(tabHolder); ViewGroup *deviceSpecsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT)); @@ -818,6 +819,7 @@ void ShaderListScreen::CreateViews() { root_ = layout; tabs_ = new TabHolder(ORIENT_HORIZONTAL, 40, new LinearLayoutParams(1.0)); + tabs_->SetTag("DevShaderList"); layout->Add(tabs_); layout->Add(new Button(di->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 9748ef499b..0802c7bca6 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -121,6 +121,7 @@ void GameSettingsScreen::CreateViews() { root_->Add(tabHolder); AddStandardBack(root_); } + tabHolder->SetTag("GameSettings"); root_->SetDefaultFocusView(tabHolder); // TODO: These currently point to global settings, not game specific ones. diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index e9a52026be..a5b6bf100a 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -709,6 +709,7 @@ void MainScreen::CreateViews() { TabHolder *leftColumn = new TabHolder(ORIENT_HORIZONTAL, 64, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); tabHolder_ = leftColumn; + tabHolder_->SetTag("MainScreenGames"); leftColumn->SetClip(true); @@ -1119,6 +1120,7 @@ void UmdReplaceScreen::CreateViews() { I18NCategory *di = GetI18NCategory("Dialog"); TabHolder *leftColumn = new TabHolder(ORIENT_HORIZONTAL, 64, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, 1.0)); + leftColumn->SetTag("UmdReplace"); leftColumn->SetClip(true); ViewGroup *rightColumn = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(270, FILL_PARENT, actionMenuMargins)); diff --git a/UI/SavedataScreen.cpp b/UI/SavedataScreen.cpp index 9f8b47a34d..ead70233e9 100644 --- a/UI/SavedataScreen.cpp +++ b/UI/SavedataScreen.cpp @@ -344,6 +344,7 @@ void SavedataScreen::CreateViews() { root_ = new LinearLayout(ORIENT_VERTICAL); 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)); browser_ = scroll->Add(new SavedataBrowser(savedata_dir, new LayoutParams(FILL_PARENT, FILL_PARENT))); browser_->OnChoice.Handle(this, &SavedataScreen::OnSavedataButtonClick); diff --git a/UI/TouchControlLayoutScreen.cpp b/UI/TouchControlLayoutScreen.cpp index 2bb91bda92..0680dbd218 100644 --- a/UI/TouchControlLayoutScreen.cpp +++ b/UI/TouchControlLayoutScreen.cpp @@ -335,6 +335,7 @@ void TouchControlLayoutScreen::CreateViews() { root_->Add(back); TabHolder *tabHolder = new TabHolder(ORIENT_VERTICAL, leftColumnWidth, new AnchorLayoutParams(10, 0, 10, 0, false)); + tabHolder->SetTag("TouchControlLayout"); root_->Add(tabHolder); // this is more for show than anything else. It's used to provide a boundary