Search the Community
Showing results for tags 'ctrlshow'.
Found 1 result
-
Hi, In my dialogs.hpp I'd like to group several controls under one common idc (so that i can do ctrlshow [_group, true] or false to hide and show the whole group. I'm currently using rscControlsgroup as a parent to achieve that but it is not satisfying because safezone size and positions params of controls inside the controlsgroup are relative to the controlsgroup position and dimension. I have tried grouping them like this: class Group1 : RscControlsGroupMRHSAT { idc = 1208; show = false; class controls { class MRHMarkings: RscPictureMRHSAT { idc = 1231; //show = false; text = "MRHSatellite\Paa\screenmarks.paa"; x = 0.250625 * safezoneW + safezoneX; y = 0.122 * safezoneH + safezoneY; w = 0.49875 * safezoneW; h = 0.49 * safezoneH; }; class MRHAltitudeName: RscStructuredTextMRHSAT { idc = 1204; text = "Altitude"; x = 0.63125 * safezoneW + safezoneX; y = 0.192 * safezoneH + safezoneY; w = 0.0590625 * safezoneW; h = 0.028 * safezoneH; }; class MRHAltitudeDisplay: RscStructuredTextMRHSAT { idc = 1205; text = "AltDisplay"; x = 0.63125 * safezoneW + safezoneX; y = 0.22 * safezoneH + safezoneY; w = 0.0590625 * safezoneW; h = 0.028 * safezoneH; }; class MRHViewModeName: RscStructuredTextMRHSAT { idc = 1206; text = "View Mode"; x = 0.63125 * safezoneW + safezoneX; y = 0.248 * safezoneH + safezoneY; w = 0.0590625 * safezoneW; h = 0.028 * safezoneH; }; class MRHViewModeDisplay: RscStructuredTextMRHSAT { idc = 1207; text = "ViewDisplay"; x = 0.63125 * safezoneW + safezoneX; y = 0.276 * safezoneH + safezoneY; w = 0.0590625 * safezoneW; h = 0.028 * safezoneH; }; class MRHSlider: RscSliderMRHSAT { idc = 1202; type = CT_SLIDER; style = SL_VERT; x = 0.716563 * safezoneW + safezoneX; y = 0.122 * safezoneH + safezoneY; w = 0.0328125 * safezoneW; h = 0.49 * safezoneH; color[] = { 1, 1, 1, 1 }; coloractive[] = { 1, 0, 0, 0.5 }; //onLoad = "call MRH_fnc_SetSatRange;"; onSliderPosChanged = "((findDisplay 9751) displayCtrl 1205) ctrlSetStructuredText parsetext (str (round (_this select 1))); _cam = missionNamespace getVariable ""SATCAM""; _cam setPos [(getpos _cam select 0), (getpos _cam select 1), (_this select 1)];"; }; }; }; that is to say without assigning position/dimension settings to the controls group itself. And surprisingly enough it seemed to work... Until I tried changing to different UI sizes and then it all got fucked up. So basically is there a way to group controls under a same idc without using controlsgroups?