Japan Interface

Centering multiple layers

Most people have no difficulty getting LD2 to centre just one layer horizontally and/or vertically, but then get confused when trying to position several layers at once. Again, it's easier to follow if you understand how LD2 works.

Let's take a straightforward example — two layers, A & B, that you want to place side by side and centre them horizontally in the screen. First of all, you need to tell Layout Designer 2 - Screen to centre one of the layers, A for example, but to leave enough room for B.

Stage of one centering multiple layers

Then, you use Layout Designer 2 - Layers to position B alongside A.

Second stage of centering multiple layers

A quick look inside the dialog box for each stage shows how it's done:

Dialog box for LD2 - Screen

In this case, LayerA has been centred horizontally, and the width of LayerB (185px) has been entered in the Group Amount box. If you wanted to make room for a third layer, just add together the width of the second and third layers, and enter the total in the Group Amount box. (Note: Just enter the figures. Do not add px to the end. This is because Layout Designer 2 only needs the figures to perform a calculation.) You can use the same technique when centering multiple layers vertically — just enter the height of the second and any subsequent layers into the Vertical Margin box (greyed out in the above figure).

Now look inside the LD2 - Layers dialog box:

Dialog box for LD2 - Layers

This shows LayerB being aligned to LayerA using align method E, with no vertical or horizontal offsets. Although that sounds very complicated, a glance at the layout of the Align Method buttons should make things clear. "T" is the Target Layer (the one you want to align another layer alongside), and the position of buttons A-H shows where you want it to go. If you had a third layer, just repeat the process, this time making LayerB the target, and aligning the third layer to it.

Understanding offsets

This is perhaps the most difficult part of LD2 to grasp in the early stages, but actually it's very simple if you remember this rule of thumb:

All movement is in relation to the target layer. That's all there is to it! It really is as simple as that.

Points to watch...

© 2002-3, Japan Interface. All rights reserved.