JOHNBELLO 3 Posted May 25, 2013 Hello. Is there anyone out there, that actually knows how the dialog system 'really' works? We are now working with it for some time and have found out several things about it and ofcourse we are able to create dialogs to our needs, but in a very non-efficient way due to issues with the "layering" inside the dialogs. Our main problem is that we have no idea how that layering works, like how to define a background picture (important, a picture!) that is actually in the background all the time. Right now we just created a RscText due to it's "native idc" to be 1000 and making that object to be layered all the way behind everything else - then in the script later on we just change it's class to RscPicture, but ofcourse if we reload it into the editor it's still text and actually working on it without having the background inside the editor is very contraproductive. So, is there anyone that really knows how to use the dialog system and/or editor in arma3 (or arma2 because it seems pretty much the same) that could help us on some issues? Share this post Link to post Share on other sites
riouken 15 Posted May 26, 2013 Use RscPicture: http://community.bistudio.com/wiki/DialogControls-Text#Static_Pictures to deal with layers, the way you define the elements differs how they are treated. For instance you can specifically define something as the background to your UI and it will always be the first layer: class RSLO_dlg { idd = -1; movingEnable = false; onLoad = "execVM 'RSLO\RSLO_ui_setup.sqf';uiNamespace setVariable ['RSLO_main_dlg', (_this select 0)];" objects[] = {}; class controlsBackground { [color=#ff0000] class background: RSLO_RscPicture[/color] [color=#ff0000] {[/color] [color=#ff0000] idc = 1200;[/color] [color=#ff0000] text = "\ca\ui\data\ui_background_controls_ca.paa";[/color] [color=#ff0000] x = 0.0138894;[/color] [color=#ff0000] y = 0.194989;[/color] [color=#ff0000] w = 0.810784;[/color] [color=#ff0000] h = 0.629413;[/color] [color=#ff0000] moving = false;[/color] [color=#ff0000] };[/color] }; class controls { class extbtn: RSLO_RscShortcutButton { idc = 1700; text = "Close"; x = 0.47304; y = 0.721132; w = 0.16536; h = 0.110893; action = "closeDialog 0"; }; class mainframe: RSLO_RscFrame { idc = 1800; text = "RSLO"; x = 0.0228757; y = 0.254902; w = 0.616339; h = 0.480174; }; class loadoutbox: RSLO_RscCombo { idc = 2100; x = 0.0988562; y = 0.342048; w = 0.181699; h = 0.0324619; tooltip = "Select a loadout from the list box."; }; class terraindetbox: RSLO_RscCombo { idc = 2101; x = 0.0972222; y = 0.488018; w = 0.180882; h = 0.0357298; tooltip = "Select a Terrain Detail level from the list box."; }; class looadouttxt: RSLO_RscText { idc = 1000; text = "Loadouts"; x = 0.126634; y = 0.281046; w = 0.168627; h = 0.0400872; }; class gearbtn: RSLO_RscShortcutButton { idc = 1702; text = "Gear Up"; x = 0.402778; y = 0.303922; w = 0.16536; h = 0.110893; action = "execVM 'RSLO\loadouts.sqf';"; }; class terrdetbtn: RSLO_RscShortcutButton { idc = 1701; text = "Set"; x = 0.403595; y = 0.454248; w = 0.16536; h = 0.110893; action = "execVM 'RSLO\settr.sqf';"; }; class terrndettxt: RSLO_RscText { idc = 1001; text = "Terrain Detail"; x = 0.104575; y = 0.430284; w = 0.168627; h = 0.0400872; }; class viewdisttxt: RSLO_RscText { idc = 1002; text = "View Distance"; x = 0.250817; y = 0.559912; w = 0.168627; h = 0.0400872; }; class RscSlider_1900: RSLO_RscSlider { idc = 1900; x = 0.138889; y = 0.666667; w = 0.379412; h = 0.0488018; onSliderPosChanged = "_this call RSLO_set_vd_fnc;"; tooltip = "Slide to set View Distance."; }; class viewdistnumb: RSLO_RscText { idc = 1100; text = "1000"; x = 0.294935; y = 0.610022; w = 0.168627; h = 0.0400872; }; }; }; Also the order in which you define the controls will define their layers, so the first control you define will be your lowest layer or your first. class RscTitles { titles[]={}; class dis_divecomp { idd = -1; fadeout=0; fadein=0; duration = 99999; name = "dis_divecomp"; onLoad = "uiNamespace setVariable ['dis_divecomp', _this select 0]"; controls[]= { [color=#ff0000]background,[/color] remaintime, bottomtime, tempture1, depth, gassname }; [color=#ff0000] class background: DIS_RscPicture { idc = IDC_DIVECOMPUTER_BACKGROUND; text = "\DIS\pics\divercomp.paa"; x = -28 * GUI_GRID_W + GUI_GRID_X; y = 0.5 * GUI_GRID_H + GUI_GRID_Y; w = 25.5 * GUI_GRID_W; h = 19 * GUI_GRID_H; shadow = 0; };[/color] class remaintime: DIS_RscText { idc = IDC_DIVECOMPUTER_REMAINTIME; text = "00:00"; x = -25.01 * GUI_GRID_W + GUI_GRID_X; y = 6.73 * GUI_GRID_H + GUI_GRID_Y; w = 8.0505 * GUI_GRID_W; h = 3.41583 * GUI_GRID_H; colorText[] = { 0, 0, 0, 1 }; SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 2)"; shadow = 0; }; class bottomtime: DIS_RscText { idc = IDC_DIVECOMPUTER_BOTTOMTIME; text = "00:00"; x = -25 * GUI_GRID_W + GUI_GRID_X; y = 11.5 * GUI_GRID_H + GUI_GRID_Y; w = 8 * GUI_GRID_W; h = 3 * GUI_GRID_H; colorText[] = { 0, 0, 0, 1 }; SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 2)"; shadow = 0; }; class tempture1: DIS_RscText { idc = IDC_DIVECOMPUTER_TEMP; text = "68"; x = -10.5 * GUI_GRID_W + GUI_GRID_X; y = 7 * GUI_GRID_H + GUI_GRID_Y; w = 5.5 * GUI_GRID_W; h = 3.5 * GUI_GRID_H; colorText[] = { 0, 0, 0, 1 }; SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 2)"; shadow = 0; }; class depth: DIS_RscText { idc = IDC_DIVECOMPUTER_DEPTH; text = "100"; x = -10.5 * GUI_GRID_W + GUI_GRID_X; y = 11.5 * GUI_GRID_H + GUI_GRID_Y; w = 5.5 * GUI_GRID_W; h = 3 * GUI_GRID_H; colorText[] = { 0, 0, 0, 1 }; SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 2)"; shadow = 0; }; class gassname: DIS_RscText { idc = IDC_DIVECOMPUTER_GASSNAME; text = "P0.7"; x = -16 * GUI_GRID_W + GUI_GRID_X; y = 11.5 * GUI_GRID_H + GUI_GRID_Y; w = 4.5 * GUI_GRID_W; h = 3 * GUI_GRID_H; colorText[] = { 0, 0, 0, 1 }; SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 2)"; shadow = 0; }; }; Share this post Link to post Share on other sites
JOHNBELLO 3 Posted May 27, 2013 Thanks for the answer. Problem is not the code in the end, i probably did not make that very clear due to not really mentioning that i mean working inside the gui editor, sorry for that. The problem is, saving it as a re-importable format for the gui editor and keeping the layers after it got imported into the editor itself. Ofcourse the positioning in the script is no problem, even if we recently did not know about the script positioning we just manages to position everything by it's idc's. But to our real issue, it is just totally annoying to load lets say a dialog template that contains the background for reusable dialogs and other things into the gui editor and not having the pictures in the background, mainly because these controlbackground parameters seem not able to be imported into the editor aswell. That's why we had to use RscText all the time, because due to it's low idc it stayed in the back of everythign else but at least defined the basic region our dialog was supposed to be. Share this post Link to post Share on other sites
lifted86 10 Posted May 27, 2013 Instead of using the copy paste import try (with your mission loaded and in the dialog editor) Ctrl + I and type missionConfigfile >> "YOUR_DIALOG" Share this post Link to post Share on other sites