Search the Community
Showing results for tags 'list boxes'.
Found 1 result
-
After much head banging I have decided its time to ask the experts... In a nutshell I am trying to write a script using using a dialog to create garage functionality for the players with integration of INIDBI2. I've worked out how to get the dialog created and populated from the databasae but for the life of me I cannot figure out how to identify what the player has selected. Any tinkering and hinting I have done is returning either an empty value (I suspect its hidden) or -1. Appreciate any help I can get with this one. +++ loadVehicleList.sqf+++ disableSerialization; _inidbi2 = ["new", "Faction Database"] call OO_INIDBI; _garArray = ["read", ["Logistics", "Garage"]] call _inidbi2; createDialog "garageMenu"; waitUntil {!isNull (findDisplay 9998);}; disableSerialization; { private ["_index"]; _index = lbAdd [1500, _x]; lbSetData [1500, _index, _x]; player sideChat format [" Index is %1. _x is %2", _index, _x]; } forEach _garArray; lbSetCurSel [ 1500, 0 ]; +++selectVehicle.sqf+++ disableSerialization; _ctrl = (findDisplay 9998) displayCtrl 1500; _selection = _ctrl lbText (lbCurSel _ctrl); P.S. I am aware there are existing examples of this but I have had a hard time digging through them. I'm also doing this to learn so copy pasta is not an option :(