Page 1 of 1

UDim resizing

Posted: Wed Dec 13, 2006 04:12
by gcarlton
I've done a small change which I think is beneficial for the editor when making layouts that aren't pure-scale. Rather than the resizing always changing the scale, or always the offset, an "auto" method is possible. This means:
- If the offset is 0, change the scale
- Otherwise, change the offset

This means that pure-scale buttons drag around as currently. However, if a button is already setup relative to the screen edge with a UDim of (0.0 + 50px), then dragging keeps the scale at 0.0 and shifts the UDim around. This means that once you've "latched" the edge to one side, it keeps latched there. It is easier to see if you see where it is "latched" from using a green line from the +0 offset position.

I have done this change and have a patch available. Here is a screenshot:

Image.

You can see that the left, top, and right is latched with a suitable offset (green line). The bottom is pure scale.

The patch is here:
http://www.hotboxgames.com/downloads/wx280-udim.patch

So the patch has two features: green line that shows offsets, and auto-moving the appropriate dimension. There is one last feature that would really help but I haven't done it: Converting the UDims from one form to another.

If my button's left edge is (0.10+0px), it would be good to right click the edge, and then "latch" it to the left (0.0+60px) or the right (1.0-540px), or back to pure scale (0.10+0px).

Posted: Mon Feb 05, 2007 01:31
by Pet
This patch is awesome! Thank you :D

Posted: Sun Apr 15, 2007 20:19
by Evak
this sounds perfect for me since I always want to work in actual screen pixels. Any chance of having binary version? (I'm an artist with no compiling tools) Will be happy to host it for this thread.

Posted: Mon Apr 16, 2007 07:46
by scriptkid
I'll have a look. I remember that i only partly added this patch to the binary but cannot remember why. I'll keep you updated on this :)