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

+12 -1
View File
@@ -65,7 +65,9 @@ public:
: MultiTouchDisplay(img, scale, new UI::AnchorLayoutParams(x * screenBounds.w, y * screenBounds.h, UI::NONE, UI::NONE, true)),
x_(x), y_(y), screenBounds_(screenBounds) {
UpdateScale(scale);
}
}
std::string DescribeText() const override;
void SaveDisplayPosition() {
x_ = bounds_.centerX() / screenBounds_.w;
@@ -84,6 +86,11 @@ private:
const Bounds &screenBounds_;
};
std::string DragDropDisplay::DescribeText() const {
auto u = GetI18NCategory("UI Elements");
return u->T("Screen representation");
}
DisplayLayoutScreen::DisplayLayoutScreen() {
// Ignore insets - just couldn't get the logic to work.
ignoreInsets_ = true;
@@ -219,6 +226,10 @@ public:
Boundary(UI::LayoutParams *layoutParams) : UI::View(layoutParams) {
}
std::string DescribeText() const override {
return "";
}
void Draw(UIContext &dc) override {
dc.Draw()->DrawImageCenterTexel(dc.theme->whiteImage, bounds_.x, bounds_.y, bounds_.x2(), bounds_.y2(), dc.theme->itemDownStyle.background.color);
}