Search the Community
Showing results for tags 'listbox'.
Found 7 results
-
i want to load all players names to my rsclistbox then click on a player and select it and by pressing the button just hint the selected players name. My next step is to teleport the target to me. Trying to learn for a small admin panel. why does this not work? heres what i got: _display = findDisplay 46 createDisplay "RscDisplayEmpty"; _playerlist = _display ctrlCreate ["RscListbox", 1500]; _playerlist ctrlSetPosition [-0.3,0.02,0.48793,0.744756]; _playerlist ctrlCommit 0.26; _playerlist ctrlSetFontHeight 0.028; _playerlist ctrlsetFont "PuristaLight"; _playerlist ctrlSetTextColor [1,1,1,1]; lbClear _playerlist; { _index = lbAdd [ 1500, name _x ]; lbSetData [ 1500, _index, name _x ]; } forEach playableUnits; button = _display ctrlCreate ["RscButton", -1]; button ctrlSetPosition [0.625,0.2,0.423497,0.276817]; button ctrlsetFont "PuristaLight"; button ctrlSetText "hint selected!"; button ctrlSetFontHeight 0.03; button ctrlCommit 0.26; button buttonSetAction " _data = lbData [ 1500, ( lbCurSel 1500 ) ]; HINT FORMAT ['%1',_data]; ";
- 11 replies
-
- rsclistbox
- listbox
-
(and 1 more)
Tagged with:
-
listbox how show vehicle and Weapons in listbox
for work posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
hello does anyone know how show all vehicle and all Weapons in listbox ? also i want Weapons to spawn with ammo that used for the same weapon -
Hi, is it possible to have more than 2 pictures in the listbox ? currently im using: lbAdd [44444,"" ]; lbSetPicture [44444, _foreachIndex -1, getText(configFile >> "cfgWeapons" >> _x select 0 >> "picture")]; lbSetPictureRight [44444, _foreachIndex -1, getText(configFile >> "cfgWeapons" >> _x select 1 select 2 >> "picture")]; result: listbox Picture but i want to add more pictures to the listbox
-
Horizontal Listbox Example needed
Bayern_Maik posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi, I cant find a working example for a horizontal Listbox (Type: CT_XLISTBOX/42) & BI's "Templates/Examples" in their "splendid" documentation don't work either (https://community.bistudio.com/wiki/DialogControls-ListBoxes). Is there anyone who could help me out with a working example control pls? There might be a ugly wrokaround with buttons but im kind of desperate to understand how this ****box is supposed to work Bueno thanks in advantage Greets from Germany Edit: Got it working, will post my example for other noobs ;D- 1 reply
-
- listbox
- horizontal
-
(and 1 more)
Tagged with:
-
listbox dynamically change the color of a specific item in a listbox [solved]
coockie_hunt1993 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello everyone, I already have to apologize for my english, this is not my native language. I come to ask your help for a concern of dialog, I am working on an administrator menu. it even built up, from a listbox to list the possible actions. I would like to add "spacer" to enter the cough more clear, my listbox and filled with a loop foreach, in the array I have an element that allows me to signify that this element and a title, I get well recovered the target element, but impisible to change the eur appearance. code : //Purge List Exec list lbClear _listExec; { _Element = _ElementExecFil select _forEachIndex; _DysplayName = _Element select 0; _ActionExec = _Element select 1; _TypeElement = _Element select 3; if (_TypeElement == "TITLE") then { _listExec lbSetColor [(lbSize _listExec)-1, [1,0.3,0.4,1]]; _listExec lbAdd format ["%1", _DysplayName]; }else { _listExec lbAdd format ["%1", _DysplayName]; }; _listExec lbSetdata [(lbSize _listExec)-1, _ActionExec]; } forEach _ElementExecFil; I try more solution : - lbSetColor - parseText but nothing changes, no error in the log. thank you in advance for your help \m/ -
Hey folks, I have got a listNbox which looks as follows: Now I am looking for a way to sort the content of the different columns, e.g, Duration from lowest to highest, or Song names from A to Z. Unfortunately there doesn't seem to be lnbSort command. My first idea was to simply put all the data for each track into an array like so: And then sort the array either by duration, song name or theme. But again, there is no "out of the box" function which can do that (Or at least I don't know one) Any help would be appreciated!
-
Problem adding things into listboxes
austin_medic posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
So I'm having a bit of an issue with my dialog, I can get it to display and all that, but I am trying to get it to populate both listboxes with various objects, and it seems no matter what I do it doesn't work.... I debugged the adding of objects to the listbox with hints and the entire array of objects is iterated through fully with no errors, still nothing gets added to the Listboxes. init.sqf player addAction["Open",{createDialog "ropeSystem";}]; AUSMD_ropeSystem_load = { _vehs = nearestObjects[(getPos player),["Car_F"],15]; //vehicle to tow other things in the vicinity. { lbAdd [150010,typeOf _x]; lbSetData [150010,_foreachIndex,_x]; } forEach _vehs; _objects = nearestObjects[(getPos player),[],15]; //this would be a list of acceptable objects to drag around. { lbAdd [150011,typeof _x]; lbSetData [150011,_foreachIndex,_x]; } forEach _objects; }; AUSMD_ropeSystem_detach = { _veh = _this select 0; _obj = _veh getVariable "AUSMD_ropeSysAttach_obj"; _rope = _veh getVariable "AUSMD_ropeSys_rope"; ropeDestroy _rope; _obj setVariable ["AUSMD_being_dragged",false,true]; _veh setVariable ["AUSMD_ropeSysAttach",false,true]; _veh setVariable ["AUSMD_ropeSysAttach_obj",nil,true]; _veh setVariable ["AUSMD_ropeSys_rope",nil,true]; hint "rope detached..."; }; AUSMD_ropeSystem_attach = { _veh = lbCurSel 150010; _obj = lbCurSel 150011; if(_veh == -1 || _obj == -1) exitWith {hint "No Selection";}; _vehR = lbData _veh; _objR = lbData _obj; if(_objR getVariable "AUSMD_being_dragged" || _vehR getVariable "AUSMD_ropeSysAttach") exitWith {hint "Vehicle or Object already being towed.";}; _rope = ropeCreate [_objR,_veh,[0,0,0.2],15]; _objR setVariable ["AUSMD_being_dragged",true,true]; _vehR setVariable ["AUSMD_ropeSysAttach",true,true]; _vehR setVariable ["AUSMD_ropeSysAttach_obj",_objR,true]; _vehR setVariable ["AUSMD_ropeSys_rope",_rope,true]; hint "attached"; }; myRope.hpp class RopeSystem { idd=-1; movingenable = false; onLoad = "[] call AUSMD_ropeSystem_load"; class controls { class attachRope: RscButton { onButtonClick = "[] call AUSMD_RopeSystem_Attach"; idc = 160010; text = "Attach Rope"; //--- ToDo: Localize; x = 0.375313 * safezoneW + safezoneX; y = 0.598 * safezoneH + safezoneY; w = 0.0984375 * safezoneW; h = 0.07 * safezoneH; }; class detachButton: RscButton { onButtonClick = "[cursorTarget] call AUSMD_RopeSystem_Detach"; idc = 160011; text = "Detach"; //--- ToDo: Localize; x = 0.539375 * safezoneW + safezoneX; y = 0.598 * safezoneH + safezoneY; w = 0.0984375 * safezoneW; h = 0.07 * safezoneH; }; class vehattachText: RscText { idc = 100100; text = "Veh to Attach To"; //--- ToDo: Localize; x = 0.355625 * safezoneW + safezoneX; y = 0.304 * safezoneH + safezoneY; w = 0.13125 * safezoneW; h = 0.042 * safezoneH; }; class objectAttachingText: RscText { idc = 100101; text = "Object your Attaching"; //--- ToDo: Localize; x = 0.519688 * safezoneW + safezoneX; y = 0.304 * safezoneH + safezoneY; w = 0.144375 * safezoneW; h = 0.042 * safezoneH; }; class titleBar: RscText { idc = 100103; text = "AUSMD - Rope Attachment System"; //--- ToDo: Localize; x = 0.335938 * safezoneW + safezoneX; y = 0.234 * safezoneH + safezoneY; w = 0.34125 * safezoneW; h = 0.056 * safezoneH; colorBackground[] = {0,0,0,1}; }; class vehicleAttachment: RscListbox { idc = 150010; x = 0.362187 * safezoneW + safezoneX; y = 0.36 * safezoneH + safezoneY; w = 0.124687 * safezoneW; h = 0.224 * safezoneH; }; class ObjectAttachment: RscListbox { idc = 150011; x = 0.52625 * safezoneW + safezoneX; y = 0.36 * safezoneH + safezoneY; w = 0.124687 * safezoneW; h = 0.224 * safezoneH; }; }; };