UI: Expose lists better in descriptions.

Explicitly marks several lists, which should make exposing text better.
This commit is contained in:
Unknown W. Brackets 2021-02-21 18:41:08 -08:00
parent 7f9a68afeb
commit 3360121b5c
16 changed files with 142 additions and 36 deletions

View File

@ -154,6 +154,23 @@ std::string LineNumberString(const std::string &str) {
return output.str();
}
std::string IndentString(const std::string &str, const std::string &sep, bool skipFirst) {
std::stringstream input(str);
std::stringstream output;
std::string line;
bool doIndent = !skipFirst;
while (std::getline(input, line)) {
if (doIndent) {
output << sep;
}
doIndent = true;
output << line << "\n";
}
return output.str();
}
void SkipSpace(const char **ptr) {
while (**ptr && isspace(**ptr)) {
(*ptr)++;

View File

@ -31,6 +31,7 @@
// Useful for shaders with error messages..
std::string LineNumberString(const std::string &str);
std::string IndentString(const std::string &str, const std::string &sep, bool skipFirst = false);
// Other simple string utilities.

View File

@ -1,9 +1,12 @@
#include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <mutex>
#include <set>
#include <sstream>
#include "Common/Data/Text/I18n.h"
#include "Common/Input/KeyCodes.h"
#include "Common/Math/curves.h"
#include "Common/UI/Context.h"
@ -157,16 +160,58 @@ void ViewGroup::Draw(UIContext &dc) {
std::string ViewGroup::DescribeText() const {
std::stringstream ss;
// TODO: In some cases, might be nice to define as a list explicitly.
bool first = true;
bool needNewline = false;
for (View *view : views_) {
if (view->GetVisibility() != V_VISIBLE)
continue;
if (!first) {
std::string s = view->DescribeText();
if (s.empty())
continue;
if (needNewline) {
ss << "\n";
}
first = false;
ss << view->DescribeText();
ss << s;
needNewline = s[s.length() - 1] != '\n';
}
return ss.str();
}
std::string ViewGroup::DescribeListUnordered(const char *heading) const {
std::stringstream ss;
ss << heading << "\n";
bool needNewline = false;
for (View *view : views_) {
if (view->GetVisibility() != V_VISIBLE)
continue;
std::string s = view->DescribeText();
if (s.empty())
continue;
ss << " - " << IndentString(s, " ", true);
}
return ss.str();
}
std::string ViewGroup::DescribeListOrdered(const char *heading) const {
std::stringstream ss;
ss << heading << "\n";
// This is how much space we need for the highest number.
int sz = (int)floorf(log10f((float)views_.size())) + 1;
std::string indent = " " + std::string(sz, ' ');
bool needNewline = false;
int n = 1;
for (View *view : views_) {
if (view->GetVisibility() != V_VISIBLE)
continue;
std::string s = view->DescribeText();
if (s.empty())
continue;
ss << std::setw(sz) << n++ << ". " << IndentString(s, indent, true);
}
return ss.str();
}
@ -599,6 +644,11 @@ void LinearLayout::Layout() {
}
}
std::string LinearLayoutList::DescribeText() const {
auto u = GetI18NCategory("UI Elements");
return DescribeListOrdered(u->T("List:"));
}
void FrameLayout::Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert) {
if (views_.empty()) {
MeasureBySpec(layoutParams_->width, 0.0f, horiz, &measuredWidth_);
@ -1151,6 +1201,11 @@ void GridLayout::Layout() {
}
}
std::string GridLayoutList::DescribeText() const {
auto u = GetI18NCategory("UI Elements");
return DescribeListOrdered(u->T("List:"));
}
TabHolder::TabHolder(Orientation orientation, float stripSize, LayoutParams *layoutParams)
: LinearLayout(Opposite(orientation), layoutParams), stripSize_(stripSize) {
SetSpacing(0.0f);
@ -1371,6 +1426,11 @@ void ChoiceStrip::Draw(UIContext &dc) {
}
}
std::string ChoiceStrip::DescribeText() const {
auto u = GetI18NCategory("UI Elements");
return DescribeListUnordered(u->T("Choices:"));
}
StickyChoice *ChoiceStrip::Choice(int index) {
if ((size_t)index < views_.size())
return static_cast<StickyChoice *>(views_[index]);
@ -1403,6 +1463,11 @@ void ListView::Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert)
}
}
std::string ListView::DescribeText() const {
auto u = GetI18NCategory("UI Elements");
return DescribeListOrdered(u->T("List:"));
}
EventReturn ListView::OnItemCallback(int num, EventParams &e) {
EventParams ev{};
ev.v = nullptr;

View File

@ -84,6 +84,9 @@ public:
std::string DescribeText() const override;
protected:
std::string DescribeListUnordered(const char *heading) const;
std::string DescribeListOrdered(const char *heading) const;
std::mutex modifyLock_; // Hold this when changing the subviews.
std::vector<View *> views_;
View *defaultFocusView_ = nullptr;
@ -192,6 +195,15 @@ private:
float spacing_;
};
class LinearLayoutList : public LinearLayout {
public:
LinearLayoutList(Orientation orientation, LayoutParams *layoutParams = nullptr)
: LinearLayout(orientation, layoutParams) {
}
std::string DescribeText() const override;
};
// GridLayout is a little different from the Android layout. This one has fixed size
// rows and columns. Items are not allowed to deviate from the set sizes.
// Initially, only horizontal layout is supported.
@ -220,6 +232,15 @@ private:
int numColumns_;
};
class GridLayoutList : public GridLayout {
public:
GridLayoutList(GridLayoutSettings settings, LayoutParams *layoutParams = nullptr)
: GridLayout(settings, layoutParams) {
}
std::string DescribeText() const override;
};
// A scrollview usually contains just a single child - a linear layout or similar.
class ScrollView : public ViewGroup {
public:
@ -289,6 +310,7 @@ public:
void Draw(UIContext &dc) override;
std::string DescribeLog() const override { return "ChoiceStrip: " + View::DescribeLog(); }
std::string DescribeText() const override;
Event OnChoice;
@ -385,6 +407,7 @@ public:
virtual void SetMaxHeight(float mh) { maxHeight_ = mh; }
Event OnChoice;
std::string DescribeLog() const override { return "ListView: " + View::DescribeLog(); }
std::string DescribeText() const override;
private:
void CreateAllItems();

View File

@ -243,7 +243,7 @@ void ControlMappingScreen::CreateViews() {
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));
LinearLayout *rightColumn = new LinearLayoutList(ORIENT_VERTICAL, new LinearLayoutParams(1.0f));
rightScroll_->Add(rightColumn);
root_->Add(leftColumn);

View File

@ -97,7 +97,7 @@ void CwCheatScreen::CreateViews() {
rightScroll_->SetTag("CwCheats");
rightScroll_->SetScrollToTop(false);
rightScroll_->ScrollTo(g_Config.fCwCheatScrollPosition);
LinearLayout *rightColumn = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(200, FILL_PARENT, actionMenuMargins));
LinearLayout *rightColumn = new LinearLayoutList(ORIENT_VERTICAL, new LinearLayoutParams(200, FILL_PARENT, actionMenuMargins));
rightScroll_->Add(rightColumn);
rightColumn->Add(new ItemHeader(cw->T("Cheats")));

View File

@ -258,7 +258,7 @@ void LogConfigScreen::CreateViews() {
UI::GridLayoutSettings gridsettings(cellSize, 64, 5);
gridsettings.fillCells = true;
GridLayout *grid = vert->Add(new GridLayout(gridsettings, new LayoutParams(FILL_PARENT, WRAP_CONTENT)));
GridLayout *grid = vert->Add(new GridLayoutList(gridsettings, new LayoutParams(FILL_PARENT, WRAP_CONTENT)));
for (int i = 0; i < LogManager::GetNumChannels(); i++) {
LogTypes::LOG_TYPE type = (LogTypes::LOG_TYPE)i;
@ -443,7 +443,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);
LinearLayout *deviceSpecs = new LinearLayoutList(ORIENT_VERTICAL);
deviceSpecs->SetSpacing(0);
deviceSpecsScroll->Add(deviceSpecs);
tabHolder->AddTab(si->T("Device Info"), deviceSpecsScroll);
@ -573,7 +573,7 @@ void SystemInfoScreen::CreateViews() {
ViewGroup *buildConfigScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
buildConfigScroll->SetTag("DevSystemInfoBuildConfig");
LinearLayout *buildConfig = new LinearLayout(ORIENT_VERTICAL);
LinearLayout *buildConfig = new LinearLayoutList(ORIENT_VERTICAL);
buildConfig->SetSpacing(0);
buildConfigScroll->Add(buildConfig);
tabHolder->AddTab(si->T("Build Config"), buildConfigScroll);
@ -611,7 +611,7 @@ void SystemInfoScreen::CreateViews() {
ViewGroup *cpuExtensionsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
cpuExtensionsScroll->SetTag("DevSystemInfoCPUExt");
LinearLayout *cpuExtensions = new LinearLayout(ORIENT_VERTICAL);
LinearLayout *cpuExtensions = new LinearLayoutList(ORIENT_VERTICAL);
cpuExtensions->SetSpacing(0);
cpuExtensionsScroll->Add(cpuExtensions);
@ -626,7 +626,7 @@ void SystemInfoScreen::CreateViews() {
ViewGroup *gpuExtensionsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
gpuExtensionsScroll->SetTag("DevSystemInfoOGLExt");
LinearLayout *gpuExtensions = new LinearLayout(ORIENT_VERTICAL);
LinearLayout *gpuExtensions = new LinearLayoutList(ORIENT_VERTICAL);
gpuExtensions->SetSpacing(0);
gpuExtensionsScroll->Add(gpuExtensions);
@ -655,7 +655,7 @@ void SystemInfoScreen::CreateViews() {
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);
LinearLayout *eglExtensions = new LinearLayoutList(ORIENT_VERTICAL);
eglExtensions->SetSpacing(0);
eglExtensionsScroll->Add(eglExtensions);
@ -1065,7 +1065,7 @@ void ShaderListScreen::CreateViews() {
layout->Add(new Button(di->T("Back")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
for (size_t i = 0; i < ARRAY_SIZE(shaderTypes); i++) {
ScrollView *scroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(1.0));
LinearLayout *shaderList = new LinearLayout(ORIENT_VERTICAL, new LayoutParams(FILL_PARENT, WRAP_CONTENT));
LinearLayout *shaderList = new LinearLayoutList(ORIENT_VERTICAL, new LayoutParams(FILL_PARENT, WRAP_CONTENT));
int count = ListShaders(shaderTypes[i].type, shaderList);
scroll->Add(shaderList);
tabs_->AddTab(StringFromFormat("%s (%d)", shaderTypes[i].name, count), scroll);
@ -1094,7 +1094,7 @@ void ShaderViewScreen::CreateViews() {
scroll->SetTag("DevShaderView");
layout->Add(scroll);
LinearLayout *lineLayout = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
LinearLayout *lineLayout = new LinearLayoutList(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
lineLayout->SetSpacing(0.0);
scroll->Add(lineLayout);
@ -1133,7 +1133,7 @@ void FrameDumpTestScreen::CreateViews() {
ViewGroup *dumpsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
dumpsScroll->SetTag("GameSettingsGraphics");
LinearLayout *dumps = new LinearLayout(ORIENT_VERTICAL);
LinearLayout *dumps = new LinearLayoutList(ORIENT_VERTICAL);
dumps->SetSpacing(0);
dumpsScroll->Add(dumps);
tabHolder->AddTab("Dumps", dumps);

View File

@ -216,7 +216,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);
LinearLayout *graphicsSettings = new LinearLayoutList(ORIENT_VERTICAL);
graphicsSettings->SetSpacing(0);
graphicsSettingsScroll->Add(graphicsSettings);
tabHolder->AddTab(ms->T("Graphics"), graphicsSettingsScroll);
@ -589,7 +589,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);
LinearLayout *audioSettings = new LinearLayoutList(ORIENT_VERTICAL);
audioSettings->SetSpacing(0);
audioSettingsScroll->Add(audioSettings);
tabHolder->AddTab(ms->T("Audio"), audioSettingsScroll);
@ -641,7 +641,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);
LinearLayout *controlsSettings = new LinearLayoutList(ORIENT_VERTICAL);
controlsSettings->SetSpacing(0);
controlsSettingsScroll->Add(controlsSettings);
tabHolder->AddTab(ms->T("Controls"), controlsSettingsScroll);
@ -752,7 +752,7 @@ void GameSettingsScreen::CreateViews() {
ViewGroup *networkingSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
networkingSettingsScroll->SetTag("GameSettingsNetworking");
LinearLayout *networkingSettings = new LinearLayout(ORIENT_VERTICAL);
LinearLayout *networkingSettings = new LinearLayoutList(ORIENT_VERTICAL);
networkingSettings->SetSpacing(0);
networkingSettingsScroll->Add(networkingSettings);
tabHolder->AddTab(ms->T("Networking"), networkingSettingsScroll);
@ -840,7 +840,7 @@ void GameSettingsScreen::CreateViews() {
ViewGroup *toolsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
toolsScroll->SetTag("GameSettingsTools");
LinearLayout *tools = new LinearLayout(ORIENT_VERTICAL);
LinearLayout *tools = new LinearLayoutList(ORIENT_VERTICAL);
tools->SetSpacing(0);
toolsScroll->Add(tools);
tabHolder->AddTab(ms->T("Tools"), toolsScroll);
@ -855,7 +855,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);
LinearLayout *systemSettings = new LinearLayoutList(ORIENT_VERTICAL);
systemSettings->SetSpacing(0);
systemSettingsScroll->Add(systemSettings);
tabHolder->AddTab(ms->T("System"), systemSettingsScroll);
@ -1604,7 +1604,7 @@ void DeveloperToolsScreen::CreateViews() {
AddStandardBack(root_);
LinearLayout *list = settingsScroll->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(1.0f)));
LinearLayout *list = settingsScroll->Add(new LinearLayoutList(ORIENT_VERTICAL, new LinearLayoutParams(1.0f)));
list->SetSpacing(0);
list->Add(new ItemHeader(sy->T("General")));

View File

@ -670,17 +670,17 @@ void GameBrowser::Refresh() {
Add(topBar);
if (*gridStyle_) {
gameList_ = new UI::GridLayout(UI::GridLayoutSettings(150*g_Config.fGameGridScale, 85*g_Config.fGameGridScale), new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
gameList_ = new UI::GridLayoutList(UI::GridLayoutSettings(150*g_Config.fGameGridScale, 85*g_Config.fGameGridScale), new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
Add(gameList_);
} else {
UI::LinearLayout *gl = new UI::LinearLayout(UI::ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
UI::LinearLayout *gl = new UI::LinearLayoutList(UI::ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
gl->SetSpacing(4.0f);
gameList_ = gl;
Add(gameList_);
}
} else {
if (*gridStyle_) {
gameList_ = new UI::GridLayout(UI::GridLayoutSettings(150*g_Config.fGameGridScale, 85*g_Config.fGameGridScale), new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
gameList_ = new UI::GridLayoutList(UI::GridLayoutSettings(150*g_Config.fGameGridScale, 85*g_Config.fGameGridScale), new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
} else {
UI::LinearLayout *gl = new UI::LinearLayout(UI::ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
gl->SetSpacing(4.0f);
@ -740,7 +740,7 @@ void GameBrowser::Refresh() {
fileInfo.clear();
path_.GetListing(fileInfo, "zip:rar:r01:7z:");
if (!fileInfo.empty()) {
UI::LinearLayout *zl = new UI::LinearLayout(UI::ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
UI::LinearLayout *zl = new UI::LinearLayoutList(UI::ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
zl->SetSpacing(4.0f);
Add(zl);
for (size_t i = 0; i < fileInfo.size(); i++) {
@ -1542,7 +1542,7 @@ void GridSettingsScreen::CreatePopupContents(UI::ViewGroup *parent) {
auto sy = GetI18NCategory("System");
ScrollView *scroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, 50, 1.0f));
LinearLayout *items = new LinearLayout(ORIENT_VERTICAL);
LinearLayout *items = new LinearLayoutList(ORIENT_VERTICAL);
items->Add(new CheckBox(&g_Config.bGridView1, sy->T("Display Recent on a grid")));
items->Add(new CheckBox(&g_Config.bGridView2, sy->T("Display Games on a grid")));

View File

@ -333,7 +333,7 @@ void GamePauseScreen::CreateViews() {
ViewGroup *leftColumn = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(1.0, scrollMargins));
root_->Add(leftColumn);
LinearLayout *leftColumnItems = new LinearLayout(ORIENT_VERTICAL, new LayoutParams(FILL_PARENT, WRAP_CONTENT));
LinearLayout *leftColumnItems = new LinearLayoutList(ORIENT_VERTICAL, new LayoutParams(FILL_PARENT, WRAP_CONTENT));
leftColumn->Add(leftColumnItems);
leftColumnItems->Add(new Spacer(0.0));

View File

@ -593,7 +593,7 @@ void RemoteISOSettingsScreen::CreateViews() {
ViewGroup *remoteisoSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LayoutParams(FILL_PARENT, FILL_PARENT));
remoteisoSettingsScroll->SetTag("RemoteISOSettings");
LinearLayout *remoteisoSettings = new LinearLayout(ORIENT_VERTICAL);
LinearLayout *remoteisoSettings = new LinearLayoutList(ORIENT_VERTICAL);
remoteisoSettings->SetSpacing(0);
remoteisoSettingsScroll->Add(remoteisoSettings);

View File

@ -298,7 +298,7 @@ void ReportScreen::CreateViews() {
overallDescription_->SetShadow(true);
UI::Orientation ratingsOrient = leftColumnWidth >= 750.0f ? ORIENT_HORIZONTAL : ORIENT_VERTICAL;
UI::LinearLayout *ratingsHolder = new LinearLayout(ratingsOrient, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT));
UI::LinearLayout *ratingsHolder = new LinearLayoutList(ratingsOrient, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT));
leftColumnItems->Add(ratingsHolder);
ratingsHolder->Add(new RatingChoice("Graphics", &graphics_))->SetEnabledPtr(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice);
ratingsHolder->Add(new RatingChoice("Speed", &speed_))->SetEnabledPtr(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice);

View File

@ -135,13 +135,13 @@ private:
std::string savePath_;
};
class SortedLinearLayout : public UI::LinearLayout {
class SortedLinearLayout : public UI::LinearLayoutList {
public:
typedef std::function<bool(const View *, const View *)> CompareFunc;
typedef std::function<bool()> DoneFunc;
SortedLinearLayout(UI::Orientation orientation, UI::LayoutParams *layoutParams = nullptr)
: UI::LinearLayout(orientation, layoutParams) {
: UI::LinearLayoutList(orientation, layoutParams) {
}
void SetCompare(CompareFunc lessFunc, DoneFunc doneFunc) {

View File

@ -457,7 +457,7 @@ void StoreScreen::CreateViews() {
ScrollView *leftScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(WRAP_CONTENT, FILL_PARENT, 0.4f));
leftScroll->SetTag("StoreMainList");
content->Add(leftScroll);
scrollItemView_ = new LinearLayout(ORIENT_VERTICAL, new LayoutParams(FILL_PARENT, WRAP_CONTENT));
scrollItemView_ = new LinearLayoutList(ORIENT_VERTICAL, new LayoutParams(FILL_PARENT, WRAP_CONTENT));
leftScroll->Add(scrollItemView_);
std::vector<StoreEntry> entries = FilterEntries();

View File

@ -29,7 +29,7 @@ void TiltAnalogSettingsScreen::CreateViews() {
root_ = new ScrollView(ORIENT_VERTICAL);
root_->SetTag("TiltAnalogSettings");
LinearLayout *settings = new LinearLayout(ORIENT_VERTICAL);
LinearLayout *settings = new LinearLayoutList(ORIENT_VERTICAL);
settings->SetSpacing(0);
settings->Add(new ItemHeader(co->T("Invert Axes")));

View File

@ -68,7 +68,7 @@ void TouchControlVisibilityScreen::CreateViews() {
UI::GridLayoutSettings gridsettings(cellSize, 64, 5);
gridsettings.fillCells = true;
GridLayout *grid = vert->Add(new GridLayout(gridsettings, new LayoutParams(FILL_PARENT, WRAP_CONTENT)));
GridLayout *grid = vert->Add(new GridLayoutList(gridsettings, new LayoutParams(FILL_PARENT, WRAP_CONTENT)));
static const char* rightAnalogKey = "Right Analog Stick (tap to customize)";
toggles_.clear();