View Single Post
Old 03-04-10, 05:42 AM   #9
karamazovnew
The Old Man
 
Join Date: Mar 2009
Location: Bucharest, Romania
Posts: 1,403
Downloads: 151
Uploads: 0


Default

Quote:
Originally Posted by TheDarkWraith View Post

Zone= 512 58 512 58 0 1 0x3F000000 0.3 -1 0x3F010000 -1 1 0 0

Can someone completely decipher that Zone= line? I have a very basic understanding of it.
.[/COLOR]
Why do you need the zone line? They've made a Menu Editor, it's easy to use. If I had that puppy in SH4...... Anyway, the Zone is the same as before and thank god for that. I'll start a new thread about the Menu Editor and how to use it (learning it myself now). I won't bother you with screenshots but here's the quick round up of how the zone line works:

Imagine that the screen is a 1024x768 box. The screen actually starts from the bottom left corner (0,0) and coordinates increase until the top right corner (1024,768). This is true on any resolution.

Zone = 512 58 ... This is the actual position of the top left corner of the item.
In other words, the TOP LEFT corner of your item sits exactly on the 512'th column from the left and the 58'th line from the bottom. But this is only informative. In SH4 you don't actually position items by changing these.

Zone = 512 58 512 58... This is the size of your item. Don't ask me why you made it 512 pixels wide by 58 pixels high, but you did.

Zone = 512 58 512 58 0 1... this is way to long to explain. Read here http://www.subsim.com/radioroom/show...28&postcount=7. So yeah, these 2 values tell the game how scale that 1024x768 box to fit the screen (for each item). This is very very powerful and I'm glad they kept it this way. You can place anything anywhere

Now on to the real positioning:

512 58 512 58 0 1 0x3F000000 This is the ID of the objects parent. The parents are usually transparent Menu groups but anything can be a parent. All children will sit ON TOP of the parent. Note that they don't actually need to be included in the parent's "box". But by default, any child is placed at the coordinates of the parent's TOP LEFT corner.


512 58 512 58 0 1 0x3F000000 0.3 -1: From the top left corner of the parent, you move the child to the RIGHT (positive value) by (0.3 * parent_width) pixels. Then DOWN(negative value) by (1*parent_height) pixels.

Zone= 512 58 512 58 0 1 0x3F000000 0.3 -1 0x3F010000: yes this is your item. Sometimes you can put a different item here but I see no reason to complicate matters.

[COLOR=red]Zone= 512 58 512 58 0 1 0x3F000000 0.3 -1 0x3F010000 -1 1: Same as before, you move the item LEFT (negative value) by (1*item_width) and then move it UP (positive value) by (1*item_height). Since our item was 512*58, we've just moved it left by 512 pixels and up by 58 pixels.

Zone= 512 58 512 58 0 1 0x3F000000 0.3 -1 0x3F010000 -1 1 0 0: this is just a simple offset in pixels. Useful to move the item a pixel or 2 without recalculating the ratios. Also useful to quickly move an item offscreen without deleting it. For example 2000 3000 will move the item well outside the screen (2000 pixels to the right and 3000 pixels up).

We still owe Zamboni a very big thanks btw:

http://www.subsim.com/radioroom/showthread.php?t=111832
karamazovnew is offline   Reply With Quote