View Single Post
Old 02-17-13, 04:02 PM   #4
Hitman
Pacific Aces Dev Team
 
Hitman's Avatar
 
Join Date: Sep 2002
Location: Spain
Posts: 6,109
Downloads: 109
Uploads: 2


Default

Quote:
ParentID and ItemID - I assume ParentID references the Group, and ItemID is a hex identifier for this item, but what confuses me is the ItemID value is repeated among several items, so doesn't have to be unique? Not sure what these attributes really do.

...

Pos - I assume refers to position on the screen, but what do the 4 coordinates represent? the 4 corners of the image?
Yes Item and Parent ID are unique. Usually Item ID is Parent ID with last numbers changed, so they keep a common beginning that highlights that one depends from the other.

Position is the first two numbers X and Y, but IIRC Y value is inverted and counts from the top of the screen downwards. The last two values is the size of the item.

Please note that position for Items that have a parent is counted starting from the parent location. For example, let's say that you have a menu page called "Attack Periscope". It will display a background over the full screen with 0,0, 1024,768

Now you position for example the torpedo tube lights on it like this:

Item=Torpedo Tube lights

512,512,128,128 and that gives you a square of 128,128 whose top left corner is at 512,512 from where the periscope screen started, i.e. from 0,0

Then you want to position the tube 1 lights, so you put the item as child to the torpedo lights background you just created and you go on like this:

Item= Tube 1 light
25,25,64,64

This would mean that the tube 1 light is located 25 pixels right and 25 down from the starting position of the Parent tube lights (512,512) and then be 64x64 pixels big.

Please double check that I got it right, I haven't edited Sh3 menu for ages
__________________
One day I will return to sea ...
Hitman is offline   Reply With Quote