Files
oboe/rsrc/dialogs/dialog.rng
Celtic Minstrel 41c3396aa3 Tear out most of the legacy code in the scenario editor - see below for details
- All Carbon code is gone
- Many dialogs converted; some are still left unimplemented since they still need to be converted
- Menus converted to a xib file
- The giant arrays specifying the configuration of the special node dialog for each special node type have been replaced with maps and sets.

Changes to dialogs:
- pict choice dialog can now show picts of differing types; this was required for picking a monster graphic, as monsters of all sizes need to be shown in the same dialog
- string choice dialog can set the title, and properly shows the currently selected string
- LEDs now accept font format
- Fixed LED group's calculation of its rect
- Fixed LED group crashing if it has no selection
- Tabbing between text fields now works
- Fix display of larger monster graphics in dialogs
- Fix the script element content showing in the browser preview
2014-07-12 22:13:27 -04:00

408 lines
9.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<define name="element.dialog">
<element name="dialog">
<ref name="attlist.dialog"/>
<zeroOrMore>
<choice>
<ref name="element.field"/>
<ref name="element.text"/>
<ref name="element.pict"/>
<ref name="element.button"/>
<ref name="element.led"/>
<ref name="element.group"/>
<ref name="element.stack"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="element.field">
<element name="field">
<ref name="attlist.field"/>
<empty/>
</element>
</define>
<define name="element.br">
<element name="br">
<ref name="attlist.br"/>
<empty/>
</element>
</define>
<define name="attlist.br" combine="interleave">
<empty/>
</define>
<define name="element.text">
<element name="text">
<ref name="attlist.text"/>
<zeroOrMore>
<choice>
<text/>
<ref name="element.br"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="element.pict">
<element name="pict">
<ref name="attlist.pict"/>
<empty/>
</element>
</define>
<define name="element.key">
<element name="key">
<ref name="attlist.key"/>
<empty/>
</element>
</define>
<define name="attlist.key" combine="interleave">
<empty/>
</define>
<define name="element.button">
<element name="button">
<ref name="attlist.button"/>
<zeroOrMore>
<choice>
<text/>
<ref name="element.key"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="element.led">
<element name="led">
<ref name="attlist.led"/>
<ref name="element.CDATA"/>
</element>
</define>
<define name="element.group">
<element name="group">
<ref name="attlist.group"/>
<oneOrMore>
<ref name="element.led"/>
</oneOrMore>
</element>
</define>
<define name="element.stack">
<element name="stack">
<ref name="attlist.stack"/>
<zeroOrMore>
<choice>
<ref name="element.field"/>
<ref name="element.text"/>
<ref name="element.pict"/>
<ref name="element.button"/>
<ref name="element.led"/>
<ref name="element.group"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="num">
<choice>
<value>NUMBER</value>
</choice>
</define>
<define name="bool">
<choice>
<value>true</value>
<value>false</value>
</choice>
</define>
<define name="picttype">
<choice>
<value>blank</value>
<value>ter</value>
<value>teranim</value>
<value>monst</value>
<value>dlog</value>
<value>talk</value>
<value>scen</value>
<value>item</value>
<value>pc</value>
<value>field</value>
<value>boom</value>
<value>missile</value>
<value>full</value>
<value>map</value>
<value>status</value>
</choice>
</define>
<define name="btntype">
<choice>
<value>small</value>
<value>regular</value>
<value>large</value>
<value>help</value>
<value>left</value>
<value>right</value>
<value>up</value>
<value>down</value>
<value>tiny</value>
<value>done</value>
<value>tall</value>
<value>trait</value>
<value>push</value>
</choice>
</define>
<define name="key">
<choice>
<value>left</value>
<value>right</value>
<value>up</value>
<value>down</value>
<value>esc</value>
<value>enter</value>
<value>return</value>
<value>tab</value>
<value>help</value>
<value>space</value>
</choice>
</define>
<define name="rect">
<attribute name="top">
<ref name="num"/>
</attribute>
<attribute name="left">
<ref name="num"/>
</attribute>
<optional>
<attribute name="width">
<ref name="num"/>
</attribute>
</optional>
<optional>
<attribute name="height">
<ref name="num"/>
</attribute>
</optional>
</define>
<define name="font">
<optional>
<attribute name="font" a:defaultValue="silom">
<choice>
<value>dungeon</value>
<value>geneva</value>
<value>silom</value>
<value>maidenword</value>
</choice>
</attribute>
</optional>
<optional>
<attribute name="size" a:defaultValue="small">
<choice>
<value>small</value>
<value>large</value>
</choice>
</attribute>
</optional>
<optional>
<attribute name="color"/>
</optional>
<optional>
<attribute name="colour"/>
</optional>
</define>
<define name="attlist.dialog" combine="interleave">
<optional>
<attribute name="skin" a:defaultValue="dark">
<choice>
<value>light</value>
<value>dark</value>
</choice>
</attribute>
</optional>
<optional>
<attribute name="debug" a:defaultValue="false">
<ref name="bool"/>
</attribute>
</optional>
<optional>
<attribute name="fore" a:defaultValue="black"/>
</optional>
<optional>
<attribute name="defbtn">
<data type="IDREF"/>
</attribute>
</optional>
</define>
<define name="attlist.field" combine="interleave">
<optional>
<attribute name="name">
<data type="ID"/>
</attribute>
</optional>
<optional>
<attribute name="type" a:defaultValue="text">
<choice>
<value>num</value>
<value>text</value>
</choice>
</attribute>
</optional>
<ref name="rect"/>
</define>
<define name="attlist.text" combine="interleave">
<optional>
<attribute name="name">
<data type="ID"/>
</attribute>
</optional>
<optional>
<attribute name="framed" a:defaultValue="true">
<ref name="bool"/>
</attribute>
</optional>
<ref name="font"/>
<optional>
<attribute name="def-key" a:defaultValue="none">
<choice>
<ref name="key"/>
<value>none</value>
</choice>
</attribute>
</optional>
<optional>
<attribute name="clickable" a:defaultValue="false">
<ref name="bool"/>
</attribute>
</optional>
<optional>
<attribute name="fromlist" a:defaultValue="none">
<choice>
<value>none</value>
<value>CDATA</value>
</choice>
</attribute>
</optional>
<ref name="rect"/>
</define>
<define name="attlist.pict" combine="interleave">
<optional>
<attribute name="name">
<data type="ID"/>
</attribute>
</optional>
<attribute name="type">
<ref name="picttype"/>
</attribute>
<optional>
<attribute name="custom" a:defaultValue="false">
<ref name="bool"/>
</attribute>
</optional>
<optional>
<attribute name="size">
<choice>
<value>small</value>
<value>wide</value>
<value>tall</value>
<value>large</value>
</choice>
</attribute>
</optional>
<optional>
<attribute name="def-key" a:defaultValue="none">
<choice>
<ref name="key"/>
<value>none</value>
</choice>
</attribute>
</optional>
<optional>
<attribute name="clickable" a:defaultValue="false">
<ref name="bool"/>
</attribute>
</optional>
<attribute name="num">
<ref name="num"/>
</attribute>
<ref name="rect"/>
</define>
<define name="attlist.button" combine="interleave">
<attribute name="name">
<data type="ID"/>
</attribute>
<attribute name="type">
<ref name="btntype"/>
</attribute>
<optional>
<attribute name="wrap" a:defaultValue="false">
<ref name="bool"/>
</attribute>
</optional>
<optional>
<attribute name="def-key" a:defaultValue="none">
<choice>
<ref name="key"/>
<value>none</value>
</choice>
</attribute>
</optional>
<optional>
<attribute name="fromlist" a:defaultValue="none">
<choice>
<value>none</value>
<value>CDATA</value>
</choice>
</attribute>
</optional>
<ref name="rect"/>
</define>
<define name="attlist.led" combine="interleave">
<optional>
<attribute name="name">
<data type="ID"/>
</attribute>
</optional>
<optional>
<attribute name="state" a:defaultValue="off">
<choice>
<value>red</value>
<value>green</value>
<value>off</value>
</choice>
</attribute>
</optional>
<optional>
<attribute name="fromlist" a:defaultValue="none">
<choice>
<value>none</value>
<value>CDATA</value>
</choice>
</attribute>
</optional>
<ref name="rect"/>
<ref name="font"/>
</define>
<define name="attlist.group" combine="interleave">
<optional>
<attribute name="name">
<data type="ID"/>
</attribute>
</optional>
<optional>
<attribute name="fromlist" a:defaultValue="none">
<choice>
<value>none</value>
<value>CDATA</value>
</choice>
</attribute>
</optional>
</define>
<define name="attlist.stack" combine="interleave">
<optional>
<attribute name="name">
<data type="ID"/>
</attribute>
</optional>
</define>
<define name="element.CDATA" combine="choice">
<notAllowed/>
</define>
<start>
<choice>
<ref name="element.dialog"/>
</choice>
</start>
</grammar>