Jump to content

Meram28

Pre Member
  • Content Count

    1
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About Meram28

  • Rank
    Newbie
  1. Hi, I'm realizing a cool script. The thing is that I chose a CheckBoxe for this. I'm talking about the CT_CHECKBOXES : https://community.bi...ntrols-CheckBox However, I didn't found any precize documentation. I want to put a button that change the state of each entry when it is pressed. The .hpp part : class Mon_Dialog { idd = 39400; movingEnabled = false; enableSimulation = true; class controls { class CheckBoxes { idc = 200; type = 7; style = ST_CENTER; x = safeZoneX + 0.03 + 0.431 - 0.075; y = 0.21 + (1 / 25); w = 0.05; h = 0.6 - (22 / 250) - 0.011; colorText[] = {0, 0.8, 0, 1}; color[] = {0, 0, 0, 0}; colorBackground[] = {0, 0, 0, 0}; colorTextSelect[] = {1, 0, 0, 1}; colorSelectedBg[] = {0, 0, 0, 0.2}; colorSelect[] = {0, 0, 0, 1}; colorTextDisable[] = {0.4, 0.4, 0.4, 1}; colorDisable[] = {0.4, 0.4, 0.4, 1}; font = "PuristaMedium"; sizeEx = 0.04; strings[] = {ON, ON, ON, ON, ON, ON, ON, ON, ON, ON}; checked_strings[] = {OFF, OFF, OFF, OFF, OFF, OFF, OFF, OFF, OFF, OFF}; rows = 10; columns = 1; onCheckBoxesSelChanged = "_this execVM 'test.sqf';"; }; class BtnReset: Life_RscButtonMenu { idc = -1; text = "Reset"; onButtonClick = "[] execVM 'reset.sqf';"; x = safeZoneX + 0.03 + 0.22; y = 0.8 - (1 / 25); w = 0.21; h = (1 / 25); }; }; }; My reset.sqf file : #define CONTROL(disp,ctrl) ((findDisplay ##disp) displayCtrl ##ctrl) hint ("MAP RESET"); CONTROL(39400,200) ctrlSetChecked true; Here is the problem : where I click on the reset button, only the first one entry is changed to true, in other words, on selected. So, maybe that this function can't change the state of all the entries of the checkboxes. I know that there is an other control type CT_CHECKBOX. Perhaps each entry is a CT_CHECKBOX. How get the idc of a specific entry to change is state ? Namely cbSetChecked allow to change the state of a CT_CHECKBOX control. We maybe have to do a cbSetChecked for each entry. Any idea ? ^^ Ha and if you find out a good and more precise documentation for CT_CHECKBOXES than that of Bohemia, I'll take it ! :p Thanks.
×