Jump to content
Sign in to follow this  
hellfire257

Dialogs & interface sizes

Recommended Posts

Hello all,

I'm having some trouble with a GUI I've made with Gaia's tool. It doesn't format properly for people who's interface size is not very small (the size I built it in).

I read through this thread here and tried what it suggested but to no avail. Perhaps I was doing it wrong though. Could anyone show me what I need to do to make it build properly on other interface sizes please?

Many thanks,

H.

Share this post


Link to post
Share on other sites

Looks okay from a brief look.

Can you please make a screenshot of the dialog with different interface sizes.

Remember to restart the game after each change before making a screenshot.

Share this post


Link to post
Share on other sites

Seems you are using safeZone wrong.

x = "(safeZoneX + (safeZoneW / 3.6))"; 
y = "(safeZoneY + (safeZoneH / 3.085))"; 
w = "(safeZoneW / 50)";
h = "(safeZoneH / 50)";

_neo_

Share this post


Link to post
Share on other sites

Hm that is what he is using (I assume generated by Gaia's tool).

Except for x/100 it uses 0.XX.

No?

Share this post


Link to post
Share on other sites
Hm that is what he is using (I assume generated by Gaia's tool).

Except for x/100 it uses 0.XX.

No?

Yes, that is correct. :)

_neo_

Share this post


Link to post
Share on other sites

Very small:

http://i.imgur.com/Ril7h.jpg

Small:

http://i.imgur.com/AfVdl.jpg

Normal:

http://imgur.com/IoZHH.jpg

Large:

http://imgur.com/YK4hZ.jpg

This might be useful also, it's where the classes are defined:

http://pastebin.jonasscholz.de/1562

I'm not sure I follow what you're saying about the safe zones.

Thanks for your help so far. :)

Edited by Hellfire257

Share this post


Link to post
Share on other sites

Only basic math. Different roads to the same result. :)

Anyway the screenshot helps a lot to actually understand your problem.

Sorry to say: Welcome to button hell. :j:

The actual positioning of the element is correct.

Your problem is the text is not aligned.

Buttons (RscShortcutButton) have this subclass. If you figure out how do

set this right, you can call yourself a master of dialog design in arma. :bounce3:

class TextPos
{
	left = 0.05;
	top = 0.034;
	right = 0.005;
	bottom = 0.005;
};

You probably need to approach your goal differently. :(

Share this post


Link to post
Share on other sites

Here's how I have been avoiding all that in WOO. I basically use percentages of the available screen to scale my dialogs.

	x = safeZoneX-(safeZoneW*0.01);
y = safeZoneY-(safeZoneH*0.01);
w = safeZoneW*1.02;
h = safeZoneH*1.02;	

And, if I want to have multiple buttons in one row, I just add more percentage-points:

	class MBG_WOO_main_MUFU_Button_1 : MBG_WOO_BASE_BUTTON {
	idc = 59801;
	colorBackground[] = MBG_WOO_COLOR_NONE;
	x = safeZoneX+(safeZoneW*0.87);
	y = safeZoneY+(safeZoneH*0.11);
	w = safeZoneW*0.03;
	h = safeZoneH*0.05;
	colorBackgroundActive[] = MBG_WOO_COLOR_ALPHAYELLOW; 
	soundEnter[] = {"\ca\ui\data\sound\new1.wss", 0.1, 1};	
	soundPush[] = {"\ca\ui\data\sound\new2.wss", 0.1, 1};			
};

class MBG_WOO_main_MUFU_Button_2 : MBG_WOO_main_MUFU_Button_1 {
	idc = 59802;
	x = safeZoneX+(safeZoneW*0.91);
};

class MBG_WOO_main_MUFU_Button_3 : MBG_WOO_main_MUFU_Button_1 {
	idc = 59803;
	x = safeZoneX+(safeZoneW*0.95);
};

And to keep up with the font-size, I do this:

#define MBG_WOO_FONT_SIZE 			0.018 * safezoneH
...
sizeEx = MBG_WOO_FONT_SIZE;

Maybe that helps. :)

Share this post


Link to post
Share on other sites

That last part might be it - thanks for sharing Mondkalb :bounce3:

Share this post


Link to post
Share on other sites

Okay, I think I can piece this together now. Experimentation is required! I'll see you all in several years! :p

I'll report back if I get anywhere.

Thanks everyone!

Share this post


Link to post
Share on other sites

Hey all,

Still haven't managed to get to the bottom of this. I tried to simply change the font size and the position of the text in relation to a set factor determined by safeZones however that didn't work.

Mondkalb, what type of button where you using for MBG_WOO_main_MUFU_Button_1?

I fear an entire rewrite is necessary!

Thanks all,

H.

Share this post


Link to post
Share on other sites
Mondkalb, what type of button where you using for MBG_WOO_main_MUFU_Button_1?

class MBG_WOO_main_MUFU_Button_1 : MBG_WOO_BASE_BUTTON {

It inherits from MBG_WOO_BASE_BUTTON, which looks like this:

class MBG_WOO_BASE_BUTTON {
idc = -1;
type = 1;
style = 0x02;
default = 0;
colorText[] = MBG_WOO_COLOR_WHITE;
font = MBG_WOO_FONT_MAIN;
sizeEx = MBG_WOO_FONT_SIZE;
colorFocused[] = MBG_WOO_COLOR_NONE; 
colorDisabled[] = MBG_WOO_COLOR_NONE;
colorBackground[] = MBG_WOO_COLOR_NONE; 
colorBackgroundDisabled[] = MBG_WOO_COLOR_NONE; 
colorBackgroundActive[] = MBG_WOO_COLOR_NONE; 
offsetX = 0.003;
offsetY = 0.003;
offsetPressedX = 0.002;
offsetPressedY = 0.002;
colorShadow[] = MBG_WOO_COLOR_NONE; 
colorBorder[] = MBG_WOO_COLOR_NONE;
borderSize = 0.0;
soundEnter[] = { "", 0, 1 };
soundPush[] = { "", 0.1, 1 };
soundClick[] = { "", 0, 1 }; 
soundEscape[] = { "", 0, 1 };
x = 0.4; y = 0.475;
w = 0.2; h = 0.05;
text = "";
action = "";
};

Share this post


Link to post
Share on other sites

Thanks,

I fixed it by simply using a different button (CT_BUTTON) to use as a base, but I also rebuilt the entire thing using what you've shown me.

Thanks very much Mondkalb! :D

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  

×