Stanzilla / WoWUIBugs

World of Warcraft UI Bug Tracker
153 stars 7 forks source link

Add XSD type for propagateMouseInput attribute #551

Closed Meorawr closed 2 months ago

Meorawr commented 2 months ago

The new propagateMouseInput XML attribute is defined in the XSD as a simple string, however to my knowledge this attribute really only accepts a limited set of values - "Motion", and what's assumed to be "Clicks" and "Both".

For static validation of XML files and autocompletion integration in editors, it'd be nice if this attribute could have a properly constrained type that defines the accepted values.

diff --git a/Interface/AddOns/Blizzard_SharedXML/UI.xsd b/Interface/AddOns/Blizzard_SharedXML/UI.xsd
index 3dea2e31..28854188 100644
--- a/Interface/AddOns/Blizzard_SharedXML/UI.xsd
+++ b/Interface/AddOns/Blizzard_SharedXML/UI.xsd
@@ -151,6 +151,13 @@
        </xs:restriction>
    </xs:simpleType>

+   <xs:simpleType name="MouseInputPropagationOption">
+       <xs:restriction base="xs:NMTOKEN">
+           <xs:enumeration value="Motion"/>
+           <xs:enumeration value="Clicks"/>
+           <xs:enumeration value="Both"/>
+       </xs:restriction>
+   </xs:simpleType>

    <xs:element name="AbsValue">
        <xs:complexType>
@@ -458,7 +465,7 @@
        <xs:attribute name="protected" type="xs:boolean" default="false"/>
        <xs:attribute name="secureReferenceKey" type="xs:string"/>
     <xs:attribute name="retainClickThroughOverride" type="xs:boolean" default="false"/>
-    <xs:attribute name="propagateMouseInput" type="xs:string"/>
+    <xs:attribute name="propagateMouseInput" type="MouseInputPropagationOption"/>
    </xs:attributeGroup>

    <xs:complexType name="LayoutFrameType">
Meorawr commented 2 months ago

we offer thanks for this being made true in 11.0.0.54361