Add banners on the top of settings pages, if editing game-specific settings show the icon.

This commit is contained in:
Henrik Rydgård committed 2025-11-09 08:51:41 +01:00
1 parent b6850eb26e
commit 6d1973edfb
38 files changed
+294 -122

No files matched your search

+11 -3
View File
@@ -1054,12 +1054,20 @@ void TextView::GetContentDimensionsBySpec(const UIContext &dc, MeasureSpec horiz
} else if (big_) {
style = &dc.GetTheme().uiFontBig;
}
dc.MeasureTextRect(*style, 1.0f, 1.0f, text_, bounds, &w, &h, textAlign_);
w += pad_ * 2.0f;
h += pad_ * 2.0f;
float measuredW;
float measuredH;
dc.MeasureTextRect(*style, 1.0f, 1.0f, text_, bounds, &measuredW, &measuredH, textAlign_);
w = measuredW + pad_ * 2.0f;
h = measuredH + pad_ * 2.0f;
if (bullet_) {
w += bulletOffset;
}
if (horiz.type == AT_MOST && bounds.w > measuredW) {
w = bounds.w;
}
if (vert.type == AT_MOST && bounds.h > measuredH) {
h = bounds.h;
}
}
void TextView::Draw(UIContext &dc) {