Implement all the missing parts of the Edit Sheets and Edit Sounds dialogs

- On load, the game now detects graphic sheets and sounds whose IDs are "discontinuous", as well as graphics intended to directly replace preset graphic sheets.
- Edit sheets dialog can now handle "discontinuous" graphics. (The edit sounds dialog already could.)
- Edit sheets dialog prompts user to create a new sheet if there are none already, and also if there are some but not ID 0 (in the latter case they can cancel and still edit the sheets).
- Edit sheets dialog prompts user to convert sheets if the scenario is legacy, rather than doing it silently
- Edit sheets dialog now has "new" and "delete" buttons
- Edit sounds dialog now has functioning "delete" button
This commit is contained in:
2015-06-17 04:29:10 -04:00
parent 580f70f49a
commit 9d74f78df3
9 changed files with 263 additions and 54 deletions

View File

@@ -0,0 +1,15 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
<dialog skin='light' defbtn='new'>
<pict type='dlog' num='16' top='6' left='6'/>
<text top='6' left='48' width='252' height='101'>
Before you create the new sheet, you need to decide what its sheet number will be.
Use the default value if you intend to fill the sheet with graphics such as terrains, items, monsters, etc.
However, if you intend to use the sheet for certain special nodes that request a full sheet,
you should probably give it a number of 100 or greater.
</text>
<text top='111' left='48' width='80' height='16'>Sheet number:</text>
<field name='num' top='110' left='138' width='80' height='16'/>
<button name='cancel' type='regular' top='141' left='234'>Cancel</button>
<button name='new' type='regular' top='141' left='169'>Create</button>
</dialog>

View File

@@ -0,0 +1,14 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
<dialog skin='light' defbtn='convert'>
<pict type='dlog' num='16' top='6' left='6'/>
<text top='6' left='48' width='252' height='121'>
This scenario was loaded from a legacy file, and as such its custom graphics have not yet been converted.
They need to be converted before you can edit them in the scenario editor.
This will automatically happen when you save, but if you prefer, you can convert them now.
Be aware that the conversion converts white to transparency,
so it may create unwanted holes if you had terrain or dialog graphics that used pure white.
</text>
<button name='cancel' type='regular' top='131' left='234'>Cancel</button>
<button name='convert' type='large' top='131' left='128'>Convert Now</button>
</dialog>

View File

@@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
<dialog skin='light' defbtn='new'>
<pict type='dlog' num='16' top='6' left='6'/>
<text top='6' left='48' width='252' height='51'>
You don't yet have any custom sheets in this scenario!
Would you like to create a new empty sheet?
You can then paste your graphics in or import them from a file.
</text>
<button name='cancel' type='regular' top='61' left='234'>Cancel</button>
<button name='new' type='large' top='61' left='128'>Create New</button>
</dialog>

View File

@@ -0,0 +1,14 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
<dialog skin='light' defbtn='new'>
<pict type='dlog' num='16' top='6' left='6'/>
<text top='6' left='48' width='252' height='91'>
Though this scenario does currently have some custom sheets,
they will not be loaded for normal graphics and can only be used in special nodes that request a full sheet.
This is because there is no sheet #0.
Would you like to create a blank sheet #0?
You can then paste in your graphics or import from a file.
</text>
<button name='cancel' type='regular' top='101' left='234'>Cancel</button>
<button name='new' type='large' top='101' left='128'>Create New</button>
</dialog>

View File

@@ -0,0 +1,13 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
<dialog skin='light' defbtn='cancel'>
<pict type='dlog' num='16' top='6' left='6'/>
<text top='6' left='48' width='252' height='91'>
Warning: By deleting this sheet, graphics on subsequent sheets will no longer be recognized by the game.
You can delete the sheet anyway, or you can move the subsequent sheets back one, overwriting this sheet.
Note that, either way, anything referencing graphics on these sheets will have to be updated.
</text>
<button name='cancel' type='regular' top='101' left='234'>Cancel</button>
<button name='move' type='large' top='101' left='63'>Move Sheets</button>
<button name='del' type='regular' top='101' left='169'>Delete</button>
</dialog>