Finally implemented the stack control, and used it for town comments in the town details dialog

This commit is contained in:
2014-12-22 13:22:06 -05:00
parent 5e762147bd
commit dcd28b363b
20 changed files with 469 additions and 17 deletions

View File

@@ -23,7 +23,7 @@
<xsl:attribute name='class'>dark</xsl:attribute>
</xsl:if>
<div class='dialog'>
<xsl:for-each select='dialog/pict'>
<xsl:for-each select='dialog/pict | dialog/stack/pict'>
<div>
<xsl:attribute name='class'>
pict
@@ -66,7 +66,7 @@
</div>
</xsl:for-each>
<xsl:for-each select='dialog/button'>
<xsl:for-each select='dialog/button | dialog/stack/button'>
<div>
<xsl:attribute name='class'>
button <xsl:value-of select='./@type'/>
@@ -88,7 +88,7 @@
</div>
</xsl:for-each>
<xsl:for-each select='dialog/led'>
<xsl:for-each select='dialog/led | dialog/stack/led'>
<div>
<xsl:attribute name='class'>
led
@@ -117,7 +117,7 @@
</div>
</xsl:for-each>
<xsl:for-each select='dialog/group/led'>
<xsl:for-each select='dialog/group/led | dialog/stack/group/led'>
<div>
<xsl:attribute name='class'>
led
@@ -147,7 +147,7 @@
</div>
</xsl:for-each>
<xsl:for-each select='dialog/text'>
<xsl:for-each select='dialog/text | dialog/stack/text'>
<div>
<xsl:attribute name='class'>
text
@@ -180,7 +180,7 @@
</div>
</xsl:for-each>
<xsl:for-each select='dialog/field'>
<xsl:for-each select='dialog/field | dialog/stack/field'>
<div class='tfield'>
<xsl:attribute name='style'>
left: <xsl:value-of select='./@left'/>px; top: <xsl:value-of select='./@top'/>px;

View File

@@ -7,7 +7,7 @@
<field name='key' top='101' left='327' width='43' height='16'/>
<field name='population' top='219' left='294' width='54' height='16'/>
<field name='difficulty' top='265' left='294' width='54' height='16'/>
<button name='okay' type='regular' top='317' left='309'>OK</button>
<button name='okay' type='regular' top='410' left='349'>OK</button>
<pict type='dlog' num='16' top='8' left='8'/>
<text size='large' top='6' left='50' width='256' height='17'>Town Details</text>
<text top='30' left='50' width='130' height='14'>Town name:</text>
@@ -16,7 +16,7 @@
<text top='98' left='59' width='261' height='41'>Number of event which prevents town death (if -1 or 0, none) - see chapter in documentation on time for more details.</text>
<text top='143' left='50' width='63' height='14'>Lighting:</text>
<!--
TODO: Put these LED labels in the LED elementes
TODO: Put these LED labels in the LED elements
-->
<text top='143' left='122' width='164' height='14'>Fully Lit</text>
<text top='160' left='122' width='164' height='14'>Dark</text>
@@ -36,4 +36,17 @@
Town difficulty (0-10):
(Determines how fast wandering monsters appear, how nasty traps are, and how hard it is to unlock doors.)
</text>
<text top='317' left='50' width='101' height='110'>Comments:<br/>
You can add up to three comments for yourself.
These are not used by the game.
Use the LEDs to the left to switch between them.
</text>
<group name='pick-cmt'>
<led name='cmt1' top='327' left='30' state='red'/>
<led name='cmt2' top='347' left='30'/>
<led name='cmt3' top='367' left='30'/>
</group>
<stack name='cmt' pages='3'>
<field name='comment' top='317' left='162' width='251' height='80'/>
</stack>
</dialog>

View File

@@ -266,6 +266,7 @@
<xs:element ref="group"/>
</xs:choice>
<xs:attribute name="name" type="xs:ID"/>
<xs:attribute name="pages" type="xs:integer"/>
</xs:complexType>
</xs:element>
<xs:element name="dialog">