Nuts and bolts of the DITL resource?

Some questions

How are the items linked to stuff? Clicking "Item Info" just gives the dimensions of it. Or is it just that mission computer does not yet support linking items?

As a subset of that question, would it be possible to create a new button, link it to a new DITL rsrc and have actions there as well? Say I wanted to add stuff like a "Theater" section to the bar, where one could pick a movie showing at the local cinema to watch.

Also, it seems like that the upper corner is 1 pix off, IE if you create a 100x100 DITL, then create a 90x90 item and place it at 4x4 then it centers. But if you put it 5x5 then it's off.

Do the extra items placed off the DITL actualy do anything? Is it safe to delete them?

The movie thing is an interesting idea, although I have no answer to your question.

The engine references the items in the DITL by their number. Each one has a unique number. If there are no items with a given number, it will skip that element in-game. So, if you remove a button, that button will not appear in the game.

You cannot add functionality to the interface elements. Sorry. You, can however, add a static picture, static text, or whatever if you want.

DO NOT delete the items outside the main window. Because of the way the DITL resource (or maybe just ResEdit's editor? shrugs) is designed, it uses a list of items with numbers from 0 to (total number - 1). This means that elements have to be created for unused numbers in the gaps. If it uses 8 and 10 but not 9, you still have to make a 9. This is itself is not why, mind; the real reason is that in both MC and MissionComputer, if you delete an item, all hgiher-numbered items' numbers are decremented, screwing the whole thing up.

Also, I believe a number of them are used; try moving them into the main area and seeing if anything shows up.

The number is just a sequential number indicating the item's position in the resource, not an ID number. It is not possible for the number of a deleted item to be 'blank'; MissionComputer and ResEdit have no choice but to 'move down' every higher-numbered item in the resource because of the way the DITL format works.

MissionComputer includes the ability to delete and re-order DITL items in order to fully implement the DITL resource type, but for the Escape Velocity games, you should not do this. If you want to remove an item from the dialogue, you should do so by moving it outside the viewable area, or the engine may not understand what you're doing.

As has been said above, the engine does not support adding functionality to the dialogue boxes, and it identifies which item it should use for which purpose using its number; there is no hidden 'linking' feature.

If you want to add an item - you can add static text or a picture, though they won't do anything - you should make sure its number is higher than those of all of the standard items in the resource.

"Skyfox" said:

Also, it seems like that the upper corner is 1 pix off, IE if you create a 100x100 DITL, then create a 90x90 item and place it at 4x4 then it centers. But if you put it 5x5 then it's off.

If you create a 100x100 DITL, the positions within it range from (0,0) through (99, 99), so a 90x90 item positioned at (4,4) will be centred.