Larrow 2828 Posted December 13, 2016 Is it not possible to inherit into class Controls of a control group. Doing so will show correctly in the configViewer but on loading a dialog only the controls defined directly in the Controls class will actually display. For example.. Description.ext #include "baseDefines.hpp" #include "ctrlGrp.hpp" #include "test.hpp" Where baseDefines is the export from BIS_fnc_exportGUIBaseClasses. ctrlGrp.hpp class test_panels { class WidgetTest2 : ctrlControlsGroup { idc = 202; x = 0 * safezoneW; y = 0 * safezoneH; w = 0.128 * safezoneW; h = 0.4 * safezoneH; class Controls { class MsgBox : ctrlStatic { idc = -1; style = ST_CENTER; x = 0 * safezoneW; y = 0 * safezoneH; w = 0.128 * safezoneW; h = 0.2 * safezoneH; text = "TEST 1"; //--- ToDo: Localize; colorBackground[] = {0,0,0,1}; }; }; }; }; Where these are the base classes i would like to inherit into a controls group Controls as below. test.hpp class testWidget { idd = 1001; x = 0.5 * safezoneW + safezoneX; y = 0.5 * safezoneH + safezoneY; w = 0.128 * safezoneW; h = 0.225 * safezoneH; class controls { class TitleBarBckGrd : ctrlStatic { idc = -1; style = ST_CENTER; x = 0 * safezoneW; y = 0 * safezoneH; w = 0.128 * safezoneW; h = 0.022 * safezoneH; text = ""; colorText[] = {0,0,0,1}; colorBackground[] = {0,0,0,1}; }; class RollUp : ctrlActiveText { idc = -1; style = ST_PICTURE; x = 0 * safezoneW; y = 0 * safezoneH; w = 0.012 * safezoneW; h = 0.022 * safezoneH; text = "\a3\3den\Data\Displays\Display3DENSave\sort_up_ca.paa"; color[] = { 1, 1, 1, 1 }; colorActive[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.77])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.51])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.08])",1}; toolTip = "Toggle visibility of widget"; }; class CloseDiag : ctrlActiveText { idc = -1; style = ST_PICTURE; x = 0.116 * safezoneW; y = 0 * safezoneH; w = 0.012 * safezoneW; h = 0.022 * safezoneH; text = "\a3\3DEN\Data\Displays\Display3DEN\search_end_ca.paa"; color[] = { 1, 1, 1, 1 }; colorActive[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.77])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.51])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.08])",1}; toolTip = "Close Widget"; }; //RollUp class RollUpCtrlGrp: ctrlControlsGroup { idc = 1002; x = 0 * safezoneW; y = 0.024 * safezoneH; w = 0.128 * safezoneW; h = 0.2 * safezoneH; class Controls : test_panels { class RollUpBackground : ctrlStatic { idc = -1; style = 512; x = 0; y = 0; w = 0.128 * safezoneW; h = 0.2 * safezoneH; ColorBackground[] = { 0.2, 0.2, 0.2, 1 }; }; }; }; }; }; Now if you run this setup you will see in the configViewer - missionConfigFile >> "testWidget" >> "controls" >> "RollUpCtrlGrp" >> "controls" that all looks fine, yet when you display the dialog only the controls directly defined within Class Controls : test_panels shows. Am I doing something wrong or is this not possible. A little background, the reason I wish to do this is that I have a mod which is a widget for Eden in which the above testWidget is actually a controls group buried deep inside Display3Den, yet I wish multiple addons to be able to access this by adding to a top level base class, test_panels in the example, for ease of use. Any ideas. Share this post Link to post Share on other sites
soolie 189 Posted December 13, 2016 Not too sure but I think it has something to do with the sizing. While trying to add a scrollbar to a structured text ctrl, I had a similar problem. If the sizes were too close to each other, nothing would show up. This is what the working version looks like, hope it helps. class RscTextInfo: RscControlsGroup { idc = 14; x = 0.33255 * safezoneW + safezoneX; y = 0.335 * safezoneH + safezoneY; w = 0.335 * safezoneW; h = 0.47 * safezoneH; sizeEx = 0.02; class VScrollbar { idc = 20; color[] = {1,1,1,0.5}; width = 0.021; autoScrollEnabled = 0; autoScrollSpeed = 0; autoScrollRewind = 0; colorActive[] = {1,1,1,1}; colorDisabled[] = {1,1,1,0.3}; thumb = "#(argb,8,8,3)color(0,0,0,1)"; arrowEmpty = "\A3\ui_f\data\GUI\RscCommon\rsccombo\arrow_combo_active_ca.paa"; arrowFull = "\A3\ui_f\data\GUI\RscCommon\rsccombo\arrow_combo_active_ca.paa"; border = "#(argb,8,8,3)color(1,1,1,1)"; }; class Controls { class textScrolltext: RscStructuredText { idc = 15; x = 0; y = 0; w = 0.325 * safezoneW; h = 5; size = 0.045; text = ""; colorText[] = {0,0,0,1}; shadow = 1.25; colorBackground[] = {0.667,0.714,0.635,1}; }; }; }; Share this post Link to post Share on other sites
Larrow 2828 Posted December 13, 2016 I dont think this is the problem Soolie, as everything works fine if defined in the Controls class I just have a problem with the inheritance, but thanks for the input. Share this post Link to post Share on other sites