View Single Post
Old 03-22-10, 11:39 AM   #6
java`s revenge
Ace of the Deep
 
Join Date: Jan 2007
Location: at periscope depth
Posts: 1,204
Downloads: 97
Uploads: 0
Default

I've also added 3 small image objects and positioned them with my mouse to mimic "labels" for the dials. I'll now resize the panel with my mouse:



The effects speak for themselves. Note that if I had actually made the panel very very small, it would've been completely obstructed by its children so it would've been impossible for me to resize it again with the mouse.

So, if you think ahead, you can quickly do stuff like:
- increase space between dials
- increase space between dials and labels

Just keep in mind to be careful when you drag items with the mouse because resizing will then bug your items.

"Yes Kara but c'mon, I mean how many times do we actually resize items?".
Well, every time you switch resolutions for example So yeah, you do need to plan ahead. Make a habbit to resize your panels temporarily just to check if the items act correctly to resizing.

Now, let's talk again about the Resize (resolution rescaling) methods.



Note that you can't see the effects in the Editor, simply because you can't change the resolution. If there's a way to do that, someone please tell me. Make a habbit of writing down each item that you want to create and think ahead how you want it to resize. Multiple combinations are possible. For example I could've opted for my Panel to resize but for my dials and labels to stay as they are. As I'd increase resolution, the distance between the dials and the labels would increase creating an awkward effect (similar to the first picture). Thus, when you combine different resize methods in a hierarchy (very useful at some times), make sure you understand how it will behave. and test it at multiple resolutions in the game before releasing the mod. You can achieve any effect that you want, don't let the editor decide for you. You have complete control.

By default, the editor selects Resize=None for all newly created items. I've already explained each so I'll now give you some examples of where each is useful:

None: any item that you WANT to become smaller and smaller as you increase resolution. Buttons are ok, but text might be hard to read and images might be hard to see.

NoConstraint: ANY invisible item that must fill the screen. That means groups, pages...

ConstantAspectRatioVerticalRes: Best used for any image that's not a background. Dials, buttons, anything that you want to retain it's overall relative size. If you use it for backgrounds (images that fill the entire screen), they'll be stretched uniformly until the top and button of the image reaches the top and bottom of the screen. That will leave you with empty bands to the sides when using non 4:3 resolutions.

ConstantAspectRatioHorizontalRes: Best used for any background image that must fill the screen. They'll be stretched uniformly until the left and right margins of the image reach the left and right edges of the screen. That will clip the image at the top and bottom when used on non 4:3 resolutions. Also, ANYTHING that is directly linked to the background and must retain it's position relative to the background (for example custom periscope marks, lens colors, the mighty AOBF) need to use this resize method. So plan ahead for clipping.

For example, when I created the AOBF for Kiub, The AOBF group and all of it's items were scaled with the ConstantAspectRatioHorizontalRes method. But its direct parent was a group that had a NoConstraint method applied. To prevent clipping, I had to place the AOBF inside my periscope viewfinder. This made it harder to see through it, but At least the AOBF appeared in full on any resolution. The periscope bearing linear dial was forced by hardcode to never scale. But I had to keep it in the same position relative to the background image. So in other words, I had:
- periscope dial None linked to:
--background image ConstantAspectRatioHorizontalRes linked to:
---periscope page NoConstraint linked to:
----root 0x0 item.

That's all I can tell you about positioning items. I'll start another thread soon to talk about specific objects and how to use them. If there's anything not perfectly clear about what I've explained or you have any tips and comments, I'm all ears
__________________
java`s revenge is offline   Reply With Quote