gc8 970 Posted May 31, 2019 Hi How do you make the kind of dialog that goes over all the rest dialogs especially over the eden editor GUI? My dialog has also problem with sendings clicks through the dialog to the editor. Would like to prevent this as well thx for any advice! Share this post Link to post Share on other sites
gc8 970 Posted June 1, 2019 Any one got ideas on this one? See how the buttons and other controls are left below the eden gui: https://imgur.com/a/aGbltJR This is my class file: Spoiler /* #Wulabu $[ 1.063, ["classEditor",[["0.5","0.5","0","0"],"2.5 * pixelW * pixelGrid","2.5 * pixelH * pixelGrid","UI_GRID"],0,0,0], [2300,"",[2,"",["-16 * UI_GRID_W + UI_GRID_X","-12 * UI_GRID_H + UI_GRID_Y","23 * UI_GRID_W","24 * UI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]], [1600,"",[2,"Save",["11 * UI_GRID_W + UI_GRID_X","-8 * UI_GRID_H + UI_GRID_Y","5.5 * UI_GRID_W","2 * UI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["action = |call CESave|;"]], [1400,"",[2,"",["-12.5 * UI_GRID_W + UI_GRID_X","-15 * UI_GRID_H + UI_GRID_Y","22.5 * UI_GRID_W","1 * UI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"Config class path to load","-1"],[]], [1601,"",[2,"Load",["11 * UI_GRID_W + UI_GRID_X","-15.5 * UI_GRID_H + UI_GRID_Y","5.5 * UI_GRID_W","2 * UI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["action = |call CEload|;"]], [2100,"",[2,"",["-12.5 * UI_GRID_W + UI_GRID_X","-14 * UI_GRID_H + UI_GRID_Y","22.5 * UI_GRID_W","1 * UI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"History","-1"],["onLBSelChanged = |_this call CEHistorySelect|;"]], [2101,"",[2,"",["-27 * UI_GRID_W + UI_GRID_X","-15 * UI_GRID_H + UI_GRID_Y","14 * UI_GRID_W","1 * UI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"Config class root","-1"],[]], [1000,"",[2,"Class to load:",["-12.5 * UI_GRID_W + UI_GRID_X","-16.5 * UI_GRID_H + UI_GRID_Y","6 * UI_GRID_W","1 * UI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]], [1001,"",[2,"Root:",["-27 * UI_GRID_W + UI_GRID_X","-16.5 * UI_GRID_H + UI_GRID_Y","4.5 * UI_GRID_W","1 * UI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]], [1602,"",[2,"New",["-27 * UI_GRID_W + UI_GRID_X","-12 * UI_GRID_H + UI_GRID_Y","5.5 * UI_GRID_W","2 * UI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["action = |call CENew|;"]], [1603,"",[2,"Close",["10.5 * UI_GRID_W + UI_GRID_X","10 * UI_GRID_H + UI_GRID_Y","5.5 * UI_GRID_W","2 * UI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["action = |closeDialog 0|;"]] ] */ #define COL_TO_FLOAT(r,g,b) (r / 255),(g / 255),(b / 255),1 class CEClassBackground : IGUIBack { colorbackground[] = { 0,0,1,1 }; }; class CEClassBg { type = 0; idc = -1; deletable = 0; style = 64; shadow = 2; colorBackground[] = { 0, 0, 1, 1 }; colorText[] = { 1, 1, 1, 1 }; font = "RobotoCondensed"; sizeEx = 0.02; text = ""; x = 0; y = 0; w = 0.3; h = 0.3; }; class ClassEditorDlg { idd = 334455; movingEnable = false; onUnload = "call CEOnClose"; class controlsBackground { class CEBackground : IGUIBack { colorbackground[] = { COL_TO_FLOAT(29,68,132) }; idc = 1200; x = -16.5 * UI_GRID_W + UI_GRID_X; y = -12.5 * UI_GRID_H + UI_GRID_Y; w = 33 * UI_GRID_W; h = 25 * UI_GRID_H; }; }; class objects { }; class controls { //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT START (by GC, v1.063, #Wulabu) //////////////////////////////////////////////////////// class RscControlsGroup_2300: RscControlsGroup { idc = 2300; x = -16 * UI_GRID_W + UI_GRID_X; y = -12 * UI_GRID_H + UI_GRID_Y; w = 23 * UI_GRID_W; h = 24 * UI_GRID_H; class Controls { }; }; class RscButton_1600: RscButton { action = "call CESave"; idc = 1600; text = "Save"; //--- ToDo: Localize; x = 11 * UI_GRID_W + UI_GRID_X; y = -8 * UI_GRID_H + UI_GRID_Y; w = 5.5 * UI_GRID_W; h = 2 * UI_GRID_H; }; class RscEdit_1400: RscEdit { idc = 1400; x = -12.5 * UI_GRID_W + UI_GRID_X; y = -15 * UI_GRID_H + UI_GRID_Y; w = 22.5 * UI_GRID_W; h = 1 * UI_GRID_H; tooltip = "Config class path to load"; //--- ToDo: Localize; }; class RscButton_1601: RscButton { action = "call CEload"; idc = 1601; text = "Load"; //--- ToDo: Localize; x = 11 * UI_GRID_W + UI_GRID_X; y = -15.5 * UI_GRID_H + UI_GRID_Y; w = 5.5 * UI_GRID_W; h = 2 * UI_GRID_H; }; class RscCombo_2100: RscCombo { onLBSelChanged = "_this call CEHistorySelect"; idc = 2100; x = -12.5 * UI_GRID_W + UI_GRID_X; y = -14 * UI_GRID_H + UI_GRID_Y; w = 22.5 * UI_GRID_W; h = 1 * UI_GRID_H; tooltip = "History"; //--- ToDo: Localize; }; class RscCombo_2101: RscCombo { idc = 2101; x = -27 * UI_GRID_W + UI_GRID_X; y = -15 * UI_GRID_H + UI_GRID_Y; w = 14 * UI_GRID_W; h = 1 * UI_GRID_H; tooltip = "Config class root"; //--- ToDo: Localize; }; class RscText_1000: RscText { idc = 1000; text = "Class to load:"; //--- ToDo: Localize; x = -12.5 * UI_GRID_W + UI_GRID_X; y = -16.5 * UI_GRID_H + UI_GRID_Y; w = 6 * UI_GRID_W; h = 1 * UI_GRID_H; }; class RscText_1001: RscText { idc = 1001; text = "Root:"; //--- ToDo: Localize; x = -27 * UI_GRID_W + UI_GRID_X; y = -16.5 * UI_GRID_H + UI_GRID_Y; w = 4.5 * UI_GRID_W; h = 1 * UI_GRID_H; }; class RscButton_1602: RscButton { action = "call CENew"; idc = 1602; text = "New"; //--- ToDo: Localize; x = -27 * UI_GRID_W + UI_GRID_X; y = -12 * UI_GRID_H + UI_GRID_Y; w = 5.5 * UI_GRID_W; h = 2 * UI_GRID_H; }; class RscButton_1603: RscButton { action = "closeDialog 0"; idc = 1603; text = "Close"; //--- ToDo: Localize; x = 10.5 * UI_GRID_W + UI_GRID_X; y = 10 * UI_GRID_H + UI_GRID_Y; w = 5.5 * UI_GRID_W; h = 2 * UI_GRID_H; }; //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT END //////////////////////////////////////////////////////// }; }; Share this post Link to post Share on other sites
pierremgi 4739 Posted June 1, 2019 Try to add: controls[] = { yourContrl1, yourCtrl2... }; just before these control classes. This way, you define an order (then a layer) for controls, if I remember. The first one, the deeper? Just try. Share this post Link to post Share on other sites
gc8 970 Posted June 2, 2019 14 hours ago, pierremgi said: Try to add: controls[] = { yourContrl1, yourCtrl2... }; just before these control classes. This way, you define an order (then a layer) for controls, if I remember. The first one, the deeper? Just try. Where do I put that? in the config.cpp or .h where my class def is? Share this post Link to post Share on other sites
gc8 970 Posted June 6, 2019 Could still use expert help on how to get the editor dialog working? 🙂 I'm using createDialog to show my dialog, is that ok? Share this post Link to post Share on other sites
sarogahtyp 1105 Posted June 6, 2019 not the case that I understand anything of working with dialogs but maybe this code written by @Larrow helps you to get what you need: Share this post Link to post Share on other sites
gc8 970 Posted June 6, 2019 @sarogahtyp Thanks but looking at the code I don't know if that approach is significantly different from what I currently use Share this post Link to post Share on other sites
pierremgi 4739 Posted June 7, 2019 On 6/2/2019 at 12:36 AM, gc8 said: Where do I put that? in the config.cpp or .h where my class def is? As I wrote: just above the control classes, inside the group of controls. class controls { controls[] = { RscControlsGroup_2300, yourCtrl2... }; class RscControlsGroup_2300: RscControlsGroup {.....}; class yourCtrl2 {.....}; } Share this post Link to post Share on other sites
gc8 970 Posted June 7, 2019 9 hours ago, pierremgi said: As I wrote: just above the control classes, inside the group of controls. class controls { controls[] = { RscControlsGroup_2300, yourCtrl2... }; class RscControlsGroup_2300: RscControlsGroup {.....}; class yourCtrl2 {.....}; } Ok gotcha now. Well I wrote this but didn't help, they are still behind: class controls { controls[] = { RscControlsGroup_2300, RscButton_1600,RscEdit_1400,RscButton_1601,RscCombo_2100,RscCombo_2101,RscText_1000,RscText_1001,RscButton_1602,RscButton_1603 }; Share this post Link to post Share on other sites
Larrow 2801 Posted June 7, 2019 Put this... class DisableBackGrnd { idc = -1; x = safeZoneXAbs; y = safeZoneY; w = safeZoneWAbs; h = safeZoneH; type = 0; style = 0; colorText[] = {1,1,1,1}; colorBackground[] = {1,1,1,0.5}; text = ""; font = "RobotoCondensedLight"; sizeEx = "4.32 * (1 / (getResolution select 3)) * pixelGrid * 0.5"; }; As the first thing inside your controlsBackground. Shown above as minimum needed to work, or just inherit from ctrlStaticBackgroundDisable and make the element cover the whole screen. Share this post Link to post Share on other sites
gc8 970 Posted June 7, 2019 35 minutes ago, Larrow said: As the first thing inside your controlsBackground. Shown above as minimum needed to work, or just inherit from ctrlStaticBackgroundDisable and make the element cover the whole screen. Tried inheriting from ctrlStaticBackgroundDisable as I could not copy & paste your values , it would give some load/parse error. But with ctrlStaticBackgroundDisable it doesn't work. Still not on top Share this post Link to post Share on other sites
Larrow 2801 Posted June 7, 2019 Works fine for me TEST MISSION 1 Share this post Link to post Share on other sites
gc8 970 Posted June 7, 2019 19 minutes ago, Larrow said: Works fine for me TEST MISSION Nice. I think I found the reason my code didn't work, I was using createDialog _ok = createDialog "ClassEditorDlg"; // Changed this findDisplay 313 createDisplay "ClassEditorDlg"; // To this With that it works Share this post Link to post Share on other sites