Jump to content
Sign in to follow this  
firefly2442

Dialog Creation Layout Tools?

Recommended Posts

That one never worked for me it crashes nearly every click, pity as it looks useful .

Share this post


Link to post
Share on other sites

I use a technique to be able to quickly get dialogs and their controls positioned quite easily and quickly. Depending on what you want to display it may help you as well?

The concept is formulae that effectively divides the screen into a grid. I generally find a 20 x 20 grid is sufficient for my simple dialog designs.

Here is an example copied from my autopilot mod. It is one of the buttons:

x = safezoneX + ((safezoneW / 20) * 7);
y = safezoneY + ((safezoneH / 20) * 19);
w = safezoneW /20;
h = safezoneH /20;

So this button starts at 7,19 and is 1 x 1 in size.

In a pseudo code like format.

x = safezoneX + ((safezoneW / 20) * [color="#FF8C00"]X_start_position[/color]);
y = safezoneY + ((safezoneH / 20) * [color="#FF8C00"]Y_start_position[/color]);
w = (safezoneW /20) * [color="#FF8C00"]X_width[/color];
h = (safezoneH /20) * [color="#FF8C00"]Y_height[/color];

This allows me to very quickly place a dialog, it is automatically scaled to the users screen specifications by using safezone as well.

The grid will be 0,0 position at the top left and 20,20 at the bottom right. Something more grand, you can always use a bigger grid e.g. 40 by 40. Just change the 20's to 40's in the formulae.

You can also still define things to a getter degree by adding or subtracting smaller offsets. Below the x component offsets the x part by one quarter a grid square and makes the width one quarter a grid square smaller.

E.g.

x = safezoneX + ((safezoneW / 20) * X_start_position) + (safezoneW / 80) ;
y = safezoneY + ((safezoneH / 20) * Y_start_position);
w = (safezoneW /20) * X_width - (safezoneX / 80);
h = (safezoneH /20) * Y_height;

Depending on what you are designing, if it is something fairly generic then the above would make the process much quicker and easier. It can also be easily hand drawn first to get the positions on some grid paper or similar.

Hope this helps

Blake.

Edited by blakeace

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×