Merge pull request #548 from NQNStudios:talk-keys

Better editing for talk node keys

* The fields start out empty, and it is *allowed* to keep *one of them* empty. (A node only needs one key to be useful, right?
* When the node is saved, empty strings are replaced with `"    "`. If this is not harmless to the game logic, then I'll need to make the game aware that either key might be `"    "`.
* You cannot type more than 4 characters in these fields (unless there's a way to insert characters I'm not aware of).
* If you put 'buy' in a field, it automatically becomes 'purc'.
* There is a note next to the response keys (kind of squished in the corner) enumerating the special logic of the in-game Buy and Sell buttons.
This commit is contained in:
2025-02-02 13:57:55 -05:00
committed by GitHub
5 changed files with 57 additions and 13 deletions

View File

@@ -3,8 +3,10 @@
<dialog defbtn='okay'>
<!-- OK button -->
<field name='who' top='26' left='186' width='64' height='16'/>
<field name='key1' top='54' left='165' width='52' height='16'/>
<field name='key2' top='54' left='285' width='52' height='16'/>
<field name='key1' top='54' left='165' width='52' height='16' max-chars='4'/>
<field name='key2' top='54' left='285' width='52' height='16' max-chars='4'/>
<text top='6' left='350' width='160' height='48'>The in-game "Buy" button checks for these response keys, in order: purc, sale, heal, iden, trai, ench</text>
<text relative='pos-in pos' rel-anchor='prev' top='0' left='0' width='160' height='50'>The "Sell" button checks for sell.</text>
<field name='extra1' top='114' left='344' width='64' height='16'/>
<field name='extra2' top='137' left='344' width='64' height='16'/>
<field name='extra3' top='160' left='344' width='64' height='16'/>

View File

@@ -150,6 +150,7 @@
</xs:simpleType>
</xs:attribute>
<xs:attribute name="tab-order" type="xs:integer"/>
<xs:attribute name="max-chars" type="xs:integer"/>
<xs:attributeGroup ref="rect-size"/>
<xs:attributeGroup ref="position"/>
</xs:extension>