Some graphics should not have black background #629

Closed
opened 2025-02-18 14:57:26 +00:00 by CelticMinstrel · 2 comments
CelticMinstrel commented 2025-02-18 14:57:26 +00:00 (Migrated from github.com)

The item and PC graphics in the Get Items dialog are the case I noticed. There might be more.

The item and PC graphics in the Get Items dialog are the case I noticed. There might be more.
NQNStudios commented 2025-02-18 16:00:40 +00:00 (Migrated from github.com)
	<xs:complexType name="pict">
		<xs:attribute name="name" type="xs:token"/>
		<xs:attribute name="type" use="required" type="picttype"/>
		<xs:attribute name="custom" default="false" type="bool"/>
		<xs:attribute name="scaled" default="false" type="bool"/>
		<xs:attribute name="framed" default="true" type="bool"/>
		<xs:attribute name="outline" default="inset" type="frameStyle"/>
		<xs:attribute name="size">
			<xs:simpleType>
				<xs:restriction base="xs:token">
					<xs:enumeration value="small"/>
					<xs:enumeration value="wide"/>
					<xs:enumeration value="tall"/>
					<xs:enumeration value="large"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute ref="def-key"/>
		<xs:attribute name="num" use="required" type="xs:integer"/>
		<xs:attributeGroup ref="rect-size"/>
		<xs:attributeGroup ref="position"/>
	</xs:complexType>

So, we could add background attribute to <pict> elements, which when set to transparent would skip the fill_rect() line and pass sf::BlendMode::Alpha to the draw call.

``` <xs:complexType name="pict"> <xs:attribute name="name" type="xs:token"/> <xs:attribute name="type" use="required" type="picttype"/> <xs:attribute name="custom" default="false" type="bool"/> <xs:attribute name="scaled" default="false" type="bool"/> <xs:attribute name="framed" default="true" type="bool"/> <xs:attribute name="outline" default="inset" type="frameStyle"/> <xs:attribute name="size"> <xs:simpleType> <xs:restriction base="xs:token"> <xs:enumeration value="small"/> <xs:enumeration value="wide"/> <xs:enumeration value="tall"/> <xs:enumeration value="large"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute ref="def-key"/> <xs:attribute name="num" use="required" type="xs:integer"/> <xs:attributeGroup ref="rect-size"/> <xs:attributeGroup ref="position"/> </xs:complexType> ``` So, we could add background attribute to `<pict>` elements, which when set to transparent would skip the fill_rect() line and pass sf::BlendMode::Alpha to the draw call.
CelticMinstrel commented 2025-02-27 05:15:56 +00:00 (Migrated from github.com)

Is anyone aware of other dialogs that shouldn't draw a background behind the icons? Maybe status icons in the spell picker? Guess I'll check that one… anything else?

Is anyone aware of other dialogs that shouldn't draw a background behind the icons? Maybe status icons in the spell picker? Guess I'll check that one… anything else?
Sign in to join this conversation.
No description provided.