engine/rpg_components/resources/gui.xsd
2024-08-29 12:41:39 +02:00

248 lines
No EOL
12 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- definition of attributes -->
<xs:attribute name="id" type="xs:string"></xs:attribute>
<xs:attribute name="x_slot" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="y_slot" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="x_dim" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="y_dim" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="x_size" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="y_size" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="normal" type="xs:string"></xs:attribute>
<xs:attribute name="selected" type="xs:string"></xs:attribute>
<xs:attribute name="click_sound" type="xs:string"></xs:attribute>
<xs:attribute name="hover_sound" type="xs:string"></xs:attribute>
<xs:attribute name="select_mode">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="bigger"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="icon" type="xs:string"></xs:attribute>
<xs:attribute name="icon_margin" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="text_color" type="xs:string"></xs:attribute>
<xs:attribute name="text_ratio" type="xs:decimal"></xs:attribute>
<xs:attribute name="text_alignment">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="left"></xs:enumeration>
<xs:enumeration value="right"></xs:enumeration>
<xs:enumeration value="top"></xs:enumeration>
<xs:enumeration value="bottom"></xs:enumeration>
<xs:enumeration value="center"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="select" type="xs:boolean"></xs:attribute>
<xs:attribute name="isolate" type="xs:boolean"></xs:attribute>
<xs:attribute name="x_offset" type="xs:integer"></xs:attribute>
<xs:attribute name="y_offset" type="xs:integer"></xs:attribute>
<xs:attribute name="width" type="xs:integer"></xs:attribute>
<xs:attribute name="height" type="xs:integer"></xs:attribute>
<xs:attribute name="padding" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="margin" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="vert_align">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="top"></xs:enumeration>
<xs:enumeration value="middle"></xs:enumeration>
<xs:enumeration value="bottom"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="hori_align">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="left"></xs:enumeration>
<xs:enumeration value="middle"></xs:enumeration>
<xs:enumeration value="right"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="background" type="xs:string"></xs:attribute>
<xs:attribute name="foreground" type="xs:string"></xs:attribute>
<xs:attribute name="button_normal" type="xs:string"></xs:attribute>
<xs:attribute name="button_selected" type="xs:string"></xs:attribute>
<xs:attribute name="fill_type">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="expand"></xs:enumeration>
<xs:enumeration value="square"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="reference_width" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="reference_height" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="layer" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="line_count" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="west_neighbour" type="xs:string"></xs:attribute>
<xs:attribute name="east_neighbour" type="xs:string"></xs:attribute>
<xs:attribute name="north_neighbour" type="xs:string"></xs:attribute>
<xs:attribute name="south_neighbour" type="xs:string"></xs:attribute>
<!-- definition of complex elements -->
<xs:element name="root">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="grid" />
</xs:choice>
<xs:attribute ref="reference_width"></xs:attribute>
<xs:attribute ref="reference_height"></xs:attribute>
<xs:attribute ref="layer"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="grid">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="grid" />
<xs:element name="button" />
<xs:element name="label" />
<xs:element name="progressbar" />
<xs:element name="textfield" />
<xs:element name="icon" />
</xs:choice>
<xs:attribute ref="id"></xs:attribute>
<xs:attribute ref="x_slot"></xs:attribute>
<xs:attribute ref="y_slot"></xs:attribute>
<xs:attribute ref="x_dim"></xs:attribute>
<xs:attribute ref="y_dim"></xs:attribute>
<xs:attribute ref="x_size"></xs:attribute>
<xs:attribute ref="y_size"></xs:attribute>
<xs:attribute ref="x_offset"></xs:attribute>
<xs:attribute ref="y_offset"></xs:attribute>
<xs:attribute ref="width"></xs:attribute>
<xs:attribute ref="height"></xs:attribute>
<xs:attribute ref="padding"></xs:attribute>
<xs:attribute ref="margin"></xs:attribute>
<xs:attribute ref="vert_align"></xs:attribute>
<xs:attribute ref="hori_align"></xs:attribute>
<xs:attribute ref="background"></xs:attribute>
<xs:attribute ref="button_normal"></xs:attribute>
<xs:attribute ref="button_selected"></xs:attribute>
<xs:attribute ref="click_sound"></xs:attribute>
<xs:attribute ref="hover_sound"></xs:attribute>
<xs:attribute ref="layer"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="button">
<xs:complexType mixed="true">
<xs:attribute ref="id"></xs:attribute>
<xs:attribute ref="x_slot"></xs:attribute>
<xs:attribute ref="y_slot"></xs:attribute>
<xs:attribute ref="x_size"></xs:attribute>
<xs:attribute ref="y_size"></xs:attribute>
<xs:attribute ref="select"></xs:attribute>
<xs:attribute ref="isolate"></xs:attribute>
<xs:attribute ref="normal"></xs:attribute>
<xs:attribute ref="selected"></xs:attribute>
<xs:attribute ref="fill_type"></xs:attribute>
<xs:attribute ref="click_sound"></xs:attribute>
<xs:attribute ref="hover_sound"></xs:attribute>
<xs:attribute ref="select_mode"></xs:attribute>
<xs:attribute ref="icon"></xs:attribute>
<xs:attribute ref="icon_margin"></xs:attribute>
<xs:attribute ref="text_color"></xs:attribute>
<xs:attribute ref="text_ratio"></xs:attribute>
<xs:attribute ref="text_alignment"></xs:attribute>
<xs:attribute ref="west_neighbour"></xs:attribute>
<xs:attribute ref="east_neighbour"></xs:attribute>
<xs:attribute ref="north_neighbour"></xs:attribute>
<xs:attribute ref="south_neighbour"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="label">
<xs:complexType mixed="true">
<xs:attribute ref="id"></xs:attribute>
<xs:attribute ref="x_slot"></xs:attribute>
<xs:attribute ref="y_slot"></xs:attribute>
<xs:attribute ref="x_size"></xs:attribute>
<xs:attribute ref="y_size"></xs:attribute>
<xs:attribute ref="text_color"></xs:attribute>
<xs:attribute ref="text_ratio"></xs:attribute>
<xs:attribute ref="text_alignment"></xs:attribute>
<xs:attribute ref="background"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="multi_line_label">
<xs:complexType mixed="true">
<xs:attribute ref="id"></xs:attribute>
<xs:attribute ref="x_slot"></xs:attribute>
<xs:attribute ref="y_slot"></xs:attribute>
<xs:attribute ref="x_size"></xs:attribute>
<xs:attribute ref="y_size"></xs:attribute>
<xs:attribute ref="line_count"></xs:attribute>
<xs:attribute ref="text_color"></xs:attribute>
<xs:attribute ref="text_ratio"></xs:attribute>
<xs:attribute ref="text_alignment"></xs:attribute>
<xs:attribute ref="background"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="multi_line_textfield">
<xs:complexType mixed="true">
<xs:attribute ref="id"></xs:attribute>
<xs:attribute ref="x_slot"></xs:attribute>
<xs:attribute ref="y_slot"></xs:attribute>
<xs:attribute ref="x_size"></xs:attribute>
<xs:attribute ref="y_size"></xs:attribute>
<xs:attribute ref="line_count"></xs:attribute>
<xs:attribute ref="text_color"></xs:attribute>
<xs:attribute ref="text_ratio"></xs:attribute>
<xs:attribute ref="text_alignment"></xs:attribute>
<xs:attribute ref="background"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="progressbar">
<xs:complexType mixed="true">
<xs:attribute ref="id"></xs:attribute>
<xs:attribute ref="x_slot"></xs:attribute>
<xs:attribute ref="y_slot"></xs:attribute>
<xs:attribute ref="x_size"></xs:attribute>
<xs:attribute ref="y_size"></xs:attribute>
<xs:attribute ref="text_color"></xs:attribute>
<xs:attribute ref="text_ratio"></xs:attribute>
<xs:attribute ref="text_alignment"></xs:attribute>
<xs:attribute ref="background"></xs:attribute>
<xs:attribute ref="foreground"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="textfield">
<xs:complexType mixed="true">
<xs:attribute ref="id"></xs:attribute>
<xs:attribute ref="x_slot"></xs:attribute>
<xs:attribute ref="y_slot"></xs:attribute>
<xs:attribute ref="x_size"></xs:attribute>
<xs:attribute ref="y_size"></xs:attribute>
<xs:attribute ref="text_color"></xs:attribute>
<xs:attribute ref="text_ratio"></xs:attribute>
<xs:attribute ref="text_alignment"></xs:attribute>
<xs:attribute ref="background"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="icon">
<xs:complexType>
<xs:attribute ref="id"></xs:attribute>
<xs:attribute ref="x_slot"></xs:attribute>
<xs:attribute ref="y_slot"></xs:attribute>
<xs:attribute ref="x_size"></xs:attribute>
<xs:attribute ref="y_size"></xs:attribute>
<xs:attribute ref="icon"></xs:attribute>
<xs:attribute ref="margin"></xs:attribute>
<xs:attribute ref="background"></xs:attribute>
<xs:attribute ref="fill_type"></xs:attribute>
<xs:attribute ref="text_color"></xs:attribute>
<xs:attribute ref="text_ratio"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>