Adjusted the example for backgrounds. Nope brushes isn't gonna work; absolute positioning of gradients is a problem.
This commit is contained in:
parent
40c388e01d
commit
9eba197fd1
|
@ -296,6 +296,7 @@ static int specsIdentical(struct attr *attr, uiAttributeSpec *spec)
|
|||
// TODO use a closest match?
|
||||
return attr->spec.Double == spec->Double;
|
||||
case uiAttributeColor:
|
||||
case uiAttributeBackground:
|
||||
// TODO use a closest match?
|
||||
return attr->spec.R == spec->R &&
|
||||
attr->spec.G == spec->G &&
|
||||
|
|
|
@ -76,6 +76,20 @@ static void setupAttributedString(void)
|
|||
|
||||
uiAttributedStringAppendUnattributed(attrstr, ", ");
|
||||
|
||||
next = "multiple backgrounds";
|
||||
start = uiAttributedStringLen(attrstr);
|
||||
end = start + strlen(next);
|
||||
uiAttributedStringAppendUnattributed(attrstr, next);
|
||||
spec.Type = uiAttributeBackground;
|
||||
// Direct2D "Peach Puff" (#FFDAB9)
|
||||
spec.R = 1.0;
|
||||
spec.G = 0.85490196078431372;
|
||||
spec.B = 0.7254901960784313;
|
||||
spec.A = 0.5;
|
||||
uiAttributedStringSetAttribute(attrstr, &spec, start, end);
|
||||
|
||||
uiAttributedStringAppendUnattributed(attrstr, ", ");
|
||||
|
||||
next = "multiple TODO";
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ _UI_ENUM(uiAttribute) {
|
|||
uiAttributeItalic,
|
||||
uiAttributeStretch,
|
||||
uiAttributeColor, // use R, G, B, A
|
||||
uiAttributeBackground, // use R, G, B, A
|
||||
// TODO
|
||||
// TODO uiAttributeSystem,
|
||||
// TODO uiAttributeCustom,
|
||||
|
|
Loading…
Reference in New Issue