_SCAR 139 Posted March 19, 2017 All, I'm trying to make a custom dialog box in Eden. I'm able to do so by creating standard dialogs, like so: class RscFrame; class IGUIBack; class RscText; class RscTitle; class RscXSliderH; class RscCheckBox; class RscButtonMenu; class RscButtonMenuCancel; class Eden_Extended_Objects_multiply_dialog { idd = 9150; movingEnable = 1; controlsBackground[] = { }; objects[] = { }; class controls { //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT START (by _SCAR, v1.063, #Tiwyny) //////////////////////////////////////////////////////// class Eden_Extended_Objects_multiply_frame: RscFrame { idc = -1; x = 0.417187 * safezoneW + safezoneX; y = 0.357 * safezoneH + safezoneY; w = 0.165625 * safezoneW; h = 0.286 * safezoneH; }; class Eden_Extended_Objects_multiply_frame_background: IGUIBack { idc = -1; x = 0.417187 * safezoneW + safezoneX; y = 0.357 * safezoneH + safezoneY; w = 0.165625 * safezoneW; h = 0.286 * safezoneH; colorBackground[] = {0, 0, 0, 1}; }; class Eden_Extended_Objects_multiply_title: RscTitle { idc = -1; text = "Multiply"; x = 0.417187 * safezoneW + safezoneX; y = 0.357 * safezoneH + safezoneY; w = 0.165625 * safezoneW; h = 0.022 * safezoneH; colorBackground[] = {35, 135, 56, 1}; }; class Eden_Extended_Objects_multiply_button_ok: RscButtonMenu { idc = -1; text = "MULTIPLY"; x = 0.530937 * safezoneW + safezoneX; y = 0.61 * safezoneH + safezoneY; w = 0.0567187 * safezoneW; h = 0.022 * safezoneH; action = "closeDialog 0; [] execVM ""\Eden_Extended_Objects\scripts\multiply.sqf"";"; }; class RscButtonMenuCancel_2700: RscButtonMenuCancel { x = 0.412344 * safezoneW + safezoneX; y = 0.61 * safezoneH + safezoneY; w = 0.0567187 * safezoneW; h = 0.022 * safezoneH; }; class Eden_Extended_Objects_multiply_label_count: RscText { idc = -1; text = "Create count / selected object"; x = 0.417187 * safezoneW + safezoneX; y = 0.412 * safezoneH + safezoneY; w = 0.165625 * safezoneW; h = 0.022 * safezoneH; }; class Eden_Extended_Objects_multiply_slider_count: RscXSliderH { idc = 9151; x = 0.417187 * safezoneW + safezoneX; y = 0.445 * safezoneH + safezoneY; w = 0.165625 * safezoneW; h = 0.011 * safezoneH; onSliderPosChanged = "_control = (_this select 0); _newCount=round(sliderPosition _control); uiNamespace setVariable [""Eden_Extended_Objects_multiply_count"",_newCount]; _control ctrlSetTooltip str(_newCount);"; }; class Eden_Extended_Objects_multiply_label_spread: RscText { idc = -1; text = "Spread size (meters)"; x = 0.417187 * safezoneW + safezoneX; y = 0.467 * safezoneH + safezoneY; w = 0.165625 * safezoneW; h = 0.022 * safezoneH; }; class Eden_Extended_Objects_multiply_slider_spread: RscXSliderH { idc = 9152; x = 0.417187 * safezoneW + safezoneX; y = 0.5 * safezoneH + safezoneY; w = 0.165625 * safezoneW; h = 0.011 * safezoneH; onSliderPosChanged = "_control = (_this select 0); _newCount=round(sliderPosition _control); uiNamespace setVariable [""Eden_Extended_Objects_multiply_spread"",_newCount]; _control ctrlSetTooltip str(_newCount);"; }; class Eden_Extended_Objects_multiply_checkbox_randomize_pos: RscCheckBox { idc = 9153; x = 0.417187 * safezoneW + safezoneX; y = 0.533 * safezoneH + safezoneY; w = 0.0154688 * safezoneW; h = 0.022 * safezoneH; }; class Eden_Extended_Objects_multiply_checkbox_randomize_pos_label: RscText { idc = -1; text = "Randomize rotation on created objects"; x = 0.417187 * safezoneW + safezoneX; y = 0.533 * safezoneH + safezoneY; w = 0.155 * safezoneW; h = 0.022 * safezoneH; }; //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT END //////////////////////////////////////////////////////// }; }; However, when doing so there are some problems. 1. I can't get it to look like anything on the original Eden windows: Instead of the familiar: 2. With my window open I can actually click on the objects BENEATH the window itself. See the "Ammo Bearer" tooltip there? I actually clicked on it with the window open. I can't find any tutorials on how to have a simple option window like this, can any kind soul point me to the right direction? Best, r. Share this post Link to post Share on other sites
Larrow 2822 Posted March 20, 2017 On 19/03/2017 at 2:13 PM, _SCAR said: 1. I can't get it to look like anything on the original Eden windows: Use the ctrl# variants of the controls instead, as this is what is used in Eden and their styles are already setup. Using call BIS_fnc_exportGUIBaseClasses will provide you with the base define which include all Rsc# base classes and the ctrl# base classes. So instead of RscButton you use ctrlButton etc. On 19/03/2017 at 2:13 PM, _SCAR said: 2. With my window open I can actually click on the objects BENEATH the window itself There are two ways to you can display a dialog in Eden.. Is to define a controlsGroup under Display3DEN > Controls. Then turn it on/off by disabling or setting its position to [0,0,0,0] << make sure its is ctrlControlsGroupNoScrollbars else you see collapsed scrolllbars. Is a normal display like you have defined. There are two ways to disable clicking and the selection box activating behind your ui.. Is to define a ctrlStatic in Display3DEN > ControlsBackground that has the same size as your ui so as to encompass it all. This needs moving along with your ui if it is movable. Is to define a ctrlStaticBackgroundDisable in the ControlsBackground of your UI, there is no need to provide positional info as it is already setup to be big enough to cover a very large area. This is similar to the Attributes window where the background is whited out and the only thing you can do is interact with the Attributes display. Above both options are synonymous with each other. Me personally for displays where you need to interact with both your display and Eden/Objects I use both method 1's. 2 Share this post Link to post Share on other sites
_SCAR 139 Posted March 21, 2017 Thank you Larrow, these did the trick with some minor quirks, but it'll do (at least for now). For instance, I've added a ctrlStaticBackgroundDisable under Display3DEN > ControlsBackground and that works except for the Panels. Again, thank you for your help. Share this post Link to post Share on other sites
Larrow 2822 Posted March 21, 2017 Add the ctrlStaticBackgroundDisable to your dialogs ControlsBackground, not Display3DEN. Else all the Eden Controls will be drawn on top of the disabled background. 1 Share this post Link to post Share on other sites
_SCAR 139 Posted March 21, 2017 1 hour ago, Larrow said: Add the ctrlStaticBackgroundDisable to your dialogs ControlsBackground, not Display3DEN. Else all the Eden Controls will be drawn on top of the disabled background. I tried that but then it doesn't show up: class display3DEN { // save reference onLoad = "uiNamespace setVariable [""Eden_Extended_Objects_multiply_parent_display"", (_this select 0)];"; onUnload = "uiNamespace setVariable [""Eden_Extended_Objects_multiply_parent_display"", displayNull];"; class Controls { class Eden_Extended_Objects_multiply_dialog: ctrlControlsGroupNoScrollbars { idc = 9150; class ControlsBackground { class Eden_Extended_Objects_multiply_modal: ctrlStaticBackgroundDisableTiles {}; }; class Controls { If I put it in Display3DEN > ControlsBackground at least it shows up. The panels are in both cases enabled, unfortunately. Share this post Link to post Share on other sites
_SCAR 139 Posted March 21, 2017 (BTW I was unable to get Eden's primary display even if findDisplay 46 should return it, at least IMU: https://community.bistudio.com/wiki/findDisplay. Which is why I'm storing it into a variable onLoad) Share this post Link to post Share on other sites
Larrow 2822 Posted March 21, 2017 Oh I see you went the controlsGroup route in the end. In that case forget the ctrlStaticBackgroundDisableTiles and do the other option I described of just using an Invisible ctrlStatic in Display3DENs background controls. Eden display is 313. 1 Share this post Link to post Share on other sites
_SCAR 139 Posted March 22, 2017 17 hours ago, Larrow said: Oh I see you went the controlsGroup route in the end. In that case forget the ctrlStaticBackgroundDisableTiles and do the other option I described of just using an Invisible ctrlStatic in Display3DENs background controls. Eden display is 313. Yeah tried that too but unfortunately the panels always are enabled anyways :) That's it for now, though, tired of bashing my head around something that should be pretty trivial. Thank you for your help Larrow, much appreciated! Share this post Link to post Share on other sites
Booker- 2 Posted April 3, 2017 Posting on here so I can find it again. Share this post Link to post Share on other sites
R3vo 2654 Posted April 9, 2017 Ignore, can't post any code for some reason. If you need more information, you can download my 3den Enhanced Mod. It contains 2 dialogues. 1 Share this post Link to post Share on other sites