Files
oboe/rsrc/dialogs/new-town.xml
Nat Quayle Nelson 500471bad1 assign escbtn and defbtn appropriately
Behaviorally: This change makes it so that Enter will never cancel
a dialog, unless that dialog only contains info to be read. Escape
will never unpredictably be treated as Enter. And some dialogs without
Escape to cancel, now can be canceled with Escape.

A lot of this just refactors dialogs to define the cancel button
at the top, not as a hotkey on a cancel button deep in the XML.
I think this makes enter/escape behavior in dialogxml files more
legible at a glance.
2025-03-30 11:51:12 -05:00

28 lines
2.1 KiB
XML

<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
<dialog defbtn='okay' escbtn='cancel'>
<pict type='dlog' num='16' top='8' left='8'/>
<text size='large' top='6' left='50' width='256' height='17'>Create New Town</text>
<text name='create' top='28' left='50' width='147' height='14'>Creating town number:</text>
<text name='num' anchor='create' relative='pos pos-in' top='0' left='4' width='33' height='14'/>
<text anchor='create' relative='pos-in pos' name='note' top='7' left='16' width='260' height='28'>
Note: Your new town will be tacked onto the end of your current town list.
</text>
<text anchor='name' relative='abs pos-in' top='1' left='50' width='84' height='14'>Town name:</text>
<field name='name' anchor='note' relative='pos-in pos' top='8' left='74' width='152' height='16'>Town name</field>
<text anchor='size' relative='abs pos-in' top='3' left='50' width='77' height='14'>Town size:</text>
<group name='size'>
<led name='huge' anchor='name' relative='pos-in pos' top='13' left='5'>Huge (128x128)</led>
<led name='lg' anchor='huge' relative='pos-in pos' top='6' left='0' state='red'>Large (64x64)</led>
<led name='med' anchor='lg' relative='pos-in pos' top='6' left='0'>Medium (48x48)</led>
<led name='sm' anchor='med' relative='pos-in pos' top='6' left='0'>Small (32x32)</led>
<led name='tiny' anchor='sm' relative='pos-in pos' top='6' left='0'>Tiny (24x24)</led>
</group>
<text anchor='preset' relative='abs pos-in' top='0' left='50' width='105' height='14'>Preset terrain:</text>
<pict name='preset' anchor='size' relative='pos-in pos' type='ter' num='0' top='4' left='6'/>
<text name='preset-name' anchor='preset' relative='pos pos-in' top='0' left='6' width='120' height='13'/>
<button name='choose-preset' anchor='preset' relative='pos pos-in' type='regular' top='14' left='6'>Choose</button>
<button name='cancel' anchor='preset' relative='pos-in pos' type='regular' top='4' left='58'>Cancel</button>
<button name='okay' anchor='cancel' relative='pos pos-in' type='regular' top='0' left='0'>OK</button>
</dialog>