Jump to content
DeltaSierraDS

GUI - RscStructuredText over RscPicture layer in GUI editor?

Recommended Posts

Hi there,

 

Just a quick question.

 

Been working with some GUI's, I am creating a new one from scratch, and I have run into a bit of a wall that I can't seem to get past..

 

I'm using the in-built Arma III GUI editor.

 

I have a picture as a background, using the RscPicture class, no issues with it at all, however I need to put some text on top of the picture, and that's where everything goes wrong,

 

while I'm inside the editor and I can visibly see the picture, buttons and a few other controls get put over the top of the rscpicture class (well it would seem so), however certain controls such as structuredtext doesn't, therefore as soon as I place the text field inside the picture, I can't see exactly where I'm putting it..

 

 

Is there an easier way to do this?

 

I have read through the tutorials on the forums and can't seem to see anything relating to it..

Share this post


Link to post
Share on other sites

have you tried using ctrl + x to copy the controls and then ctrl + v to paste it back? this should change the draw order of the control. u should get by experiencing the right order for the text and image control...

Share this post


Link to post
Share on other sites

Yeah I've tried using Ctrl + X and V to change the order of it, but still no luck.. Not quite sure what I'm doing wrong, there has to be a way to do it.

Share this post


Link to post
Share on other sites

hmm could it be that the render order is affected by idc of the control?

Share this post


Link to post
Share on other sites

Press ctrl+s and save as "GUI Editor" (this action will save your dialog into the clipboard), then paste the output into a text file (you should be keeping a backup of your dialog anyway, I even keep incremental backups for when I add new controls). Find your picture control (default is (1199+number_of_RscPicture's), so if you just have one it will be default 1200) and change it to something invisible like an RscFrame (idc 1800). Now copy everything inside the multi-line comments, but not those1, and then open the GUI editor again. It will auto-load from the clipboard.

 

Also, I believe rendering order is determined by order in the dialog class. So when you want to save your dialog (ctrl+s -> "config (controls as class)"), just paste the output into your dialog class, then you can manually edit the class order by using cut->paste or copy->paste->delete. You can also edit the order in your backup "GUI Editor" file the same way.

 

1 Example:

/* #Mineze //do not copy
$[
	1.063,
	["test_dialog",[[0,0,1,1],0.025,0.04,"GUI_GRID"],0,0,0],
	[1800,"",[1,"",["0.491144 * safezoneW + safezoneX","0.383333 * safezoneH + safezoneY","0.0524866 * safezoneW","0.07 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]],
	[1200,"",[1,"#(argb,8,8,3)color(1,1,1,1)",["0.388466 * safezoneW + safezoneX","0.528 * safezoneH + safezoneY","0.0524866 * safezoneW","0.07 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]]
]
*/ //do not copy

//copy everything except the two lines marked "do not copy"

Share this post


Link to post
Share on other sites

Press Ctrl + L and you can change the UI element order.

Share this post


Link to post
Share on other sites

Press Ctrl + L and you can change the UI element order.

 

Unfortunately changing the UI Element order didn't seem to do anything, but thanks for the suggestion.

 

 

Press ctrl+s and save as "GUI Editor" (this action will save your dialog into the clipboard), then paste the output into a text file (you should be keeping a backup of your dialog anyway, I even keep incremental backups for when I add new controls). Find your picture control (default is (1199+number_of_RscPicture's), so if you just have one it will be default 1200) and change it to something invisible like an RscFrame (idc 1800). Now copy everything inside the multi-line comments, but not those1, and then open the GUI editor again. It will auto-load from the clipboard.

 

Also, I believe rendering order is determined by order in the dialog class. So when you want to save your dialog (ctrl+s -> "config (controls as class)"), just paste the output into your dialog class, then you can manually edit the class order by using cut->paste or copy->paste->delete. You can also edit the order in your backup "GUI Editor" file the same way.

 

1 Example:

/* #Mineze //do not copy
$[
	1.063,
	["test_dialog",[[0,0,1,1],0.025,0.04,"GUI_GRID"],0,0,0],
	[1800,"",[1,"",["0.491144 * safezoneW + safezoneX","0.383333 * safezoneH + safezoneY","0.0524866 * safezoneW","0.07 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]],
	[1200,"",[1,"#(argb,8,8,3)color(1,1,1,1)",["0.388466 * safezoneW + safezoneX","0.528 * safezoneH + safezoneY","0.0524866 * safezoneW","0.07 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]]
]
*/ //do not copy

//copy everything except the two lines marked "do not copy"

 

This is a great idea, but when I change it to a invisible frame, I can no longer actually see the picture so I'm back at square one with trying to make everything fit nicely.

Share this post


Link to post
Share on other sites

Do you need the text to change? After this much trouble you might as well just overlay the text in MS paint or something

Share this post


Link to post
Share on other sites

Unfortunately I do need the text to change, all the text that is displayed on the dialog is handled through scripts. I also need to put other controls on there such as comboboxes etc, I'll keep trying and see if I can figure out a way to do it.

 

Thanks for your help.

Share this post


Link to post
Share on other sites

Have you saved and reloaded the mission after the GUI changes? This is needed for the changes to take affect.

Share this post


Link to post
Share on other sites

Yeah after I save and reload the mission to go into the GUI editor the rscpicture class automatically changes itself to rscframe for some reason.

Share this post


Link to post
Share on other sites

If you paste the code here I can take a look. I have done this before just don't remember exactly how.

Share this post


Link to post
Share on other sites

In the GUI editor right click your RscPicture and set its text color to [1,1,1,0.5]

Then use CTRL+L to make sure you RscStructuredText is above your picture so you can grab and move it.

For some reason RscPictures get drawn above everything in the editor no matter there assigned order (although their order is correct as you can move and place other elements above them), setting to half alpha will allow you to see your other controls and position them.

Share this post


Link to post
Share on other sites

In the GUI editor right click your RscPicture and set its text color to [1,1,1,0.5]

Then use CTRL+L to make sure you RscStructuredText is above your picture so you can grab and move it.

For some reason RscPictures get drawn above everything in the editor no matter there assigned order (although their order is correct as you can move and place other elements above them), setting to half alpha will allow you to see your other controls and position them.

 

Thank you! Works perfectly.

 

Thank you to everyone else who helped !

Share this post


Link to post
Share on other sites

Have you saved and reloaded the mission after the GUI changes? This is needed for the changes to take affect.

Also it's worth noting that you don't have to save and reload. Just one or the other is enough

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

×