UI: Add text description for all views.

This commit is contained in:
Unknown W. Brackets committed 2021-02-21 16:38:02 -08:00
1 parent 7c72fe7110
commit 3c778f567c
23 files changed
+252 -103

No files matched your search

+6
View File
@@ -174,6 +174,7 @@ public:
}
void Draw(UIContext &dc) override;
std::string DescribeText() const override;
void GetContentDimensions(const UIContext &dc, float &w, float &h) const override {
w = 500;
h = 74;
@@ -323,6 +324,11 @@ void SavedataButton::Draw(UIContext &dc) {
dc.RebindTexture();
}
std::string SavedataButton::DescribeText() const {
auto u = GetI18NCategory("UI Elements");
return ReplaceAll(u->T("%1 button"), "%1", title_) + "\n" + subtitle_;
}
SavedataBrowser::SavedataBrowser(std::string path, UI::LayoutParams *layoutParams)
: LinearLayout(UI::ORIENT_VERTICAL, layoutParams), path_(path) {
Refresh();