Jump to content
Sign in to follow this  
chronicsilence

Dialogs: controls vs. backgroundControls

Recommended Posts

I can't seem to find any documentation on this question, all it says on the Dialog Control page is that one is for background and one is not. So my question is, what will be the difference in behaviour when placing a dialog control in the "Controls" category vs. putting it in the "ControlsBackground" category in a dialog CFG? When would it be a good idea to use one instead of the other?

Share this post


Link to post
Share on other sites

I think it allows you to specify layers of controls in the background using z-index, kind of like with web page controls in CSS, which specifies what control is on top of another. If you open the animation viewer, the square grid appears behind the dialog box. I'm not overly familiar with the ins and outs of dialog controls in A3, but I think that might be done with background controls. I looked inside UI_F pbo and there is an RscDisplaAnimViwer.hpp that uses background controls (requires Eliteness and unrap to get to it). There are a lot of hpp files in UI_F that use background controls, including RscAVCamera.hpp. The AAN news resource uses ControlsBackground for the white bar and red bar. Hope this helps in some way.

Share this post


Link to post
Share on other sites

controls[] = {}; //Items that the user can interact with
controlsBackground[] = {background, frame, textbox, picture}; //background things that can’t be interacted with **FURTHEST BACK FIRST IN LIST**

In the above example picture is the top most layer, background would be the back/lower most layer

The names listed above are as defined in your .hpp file

ie

	class background: Box
{
	idc = 1800;

	x = 4 * GUI_GRID_W + GUI_GRID_X;
	y = 0 * GUI_GRID_H + GUI_GRID_Y;
	w = 30.5 * GUI_GRID_W;
	h = 26.5 * GUI_GRID_H;
	colorBackground[] = {0,0,0,0.75};

};
class frame: RscFrame
{
	idc = 1801;

	x = 4.5 * GUI_GRID_W + GUI_GRID_X;
	y = 2 * GUI_GRID_H + GUI_GRID_Y;
	w = 29.5 * GUI_GRID_W;
	h = 24 * GUI_GRID_H;

};
//etc...

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  

×