IrishMob Posted August 28, 2013 Report Share Posted August 28, 2013 Is there way to just add the key db name in the key description within the gear menu? so it will say black key then in the description be like itemblackkey3455 . then ppl could at least write down what the key belongs to? Any ideas on how this could be done? Link to comment Share on other sites More sharing options...
IrishMob Posted August 28, 2013 Author Report Share Posted August 28, 2013 Any ideas? Link to comment Share on other sites More sharing options...
Kind-Sir Posted August 29, 2013 Report Share Posted August 29, 2013 It could be possibly by manipulating the gear menu with a custom text dialog in the location of the gear's text dialog, then listening for an event of which item is selected, and then get the classname (ItemKeyColor###) to display in the location of the gear description. The gear display number is 106, which could be used with any of the display commands following: findDisplay, closeDisplay, createDisplay, displayAddEventHandler, displaySetEventHandler, displayRemoveEventHandler, displayCtrl User Interface Event Handlers: http://community.bistudio.com/wiki/User_Interface_Event_Handlers Some related topics:http://forums.bistudio.com/showthread.php?130280-Gear-dialoghttp://forums.bistudio.com/showthread.php?160231-Interaction-with-inventory-items Some useful resources:http://community.bistudio.com/wiki/Dialog_Controlhttp://community.bistudio.com/wiki/Category:Scripting_Commands_ArmA2http://resources.bisimulations.com/wiki/Dialog_Control EDIT: I adjusted the below code to work with Arma 2, however, it acts funky in the editor for Arma 2. Have not tested this out any further than the editor. handle = [] spawn { fnc_test = { _control = _this select 0; _selectedIndex = _this select 1; _data = format ["Data\n%1\n________\n",_control lbData _selectedIndex]; _text = format ["Text\n%1\n________\n",_control lbText _selectedIndex]; _value = format ["Value\n%1\n________\n",_control lbValue _selectedIndex]; _pic = format ["Picture\n%1\n________\n",_control lbPicture _selectedIndex]; hint format["Selected Uniform Index: %1,%2\n%3%4%5%6",_control,_selectedIndex,_data,_text,_value,_pic]; //hint format["%1\n%2",_this select 0, _this select 1]; }; while {true} do { waituntil {!(isnull (finddisplay 106))}; hint "Inventory has been opened\nAdding event to uniform listbox"; ((findDisplay 106) displayCtrl 105) ctrlSetEventHandler ["LBSelChanged", "_this call fnc_test"]; waituntil {isnull (finddisplay 106)}; }; }; I have seen the command ctrlSetText used to change text on a dialog menu. Maybe something can be done there if you can find the displayCtrl of the gear description? EDIT: I got curious and unpacked the UI.pbo inside of the Arma2oa/Expansion/Addons folder, and used the unRap program to decompile the config.bin from the UI.pbo I was able to get the IDC (dialog) numbers for the gear menus. Here are some: CA_Item_Picture = 1104 CA_CustomDescription = 1106 G_GearItems = 160 CA_Gear_slot_primary = 107 CA_Gear_slot_secondary = 108 CA_Gear_slot_handgun = 121 CA_Gear_slot_item1-12 = 109-120 CA_Gear_slot_handgun_item1-8 = 122-129 CA_ItemName = 1101 Gear_Title = 1001 Unit_Title = 101 Inside Expansion/dta/bin.pbo/config.bin is RscDisplayGear.hpp which lists: RscDisplayGear = 106 Title = 101 B_Add = 146 B_Remove = 147 B_Rearm = 132 B_OpenBag = 157 B_CloseBag = 158 B_Close = 2 Pool = 105 Skill = 102 Vehicle = 103 It seems that the Weapons dialog is defined by IDC_GEAR_WEAPONS. The following are referenced: IDC_GEAR_WEAPONS IDC_GEAR_SELECT IDC_GEAR_SELECT_TITLE IDC_GEAR_SELECT_OVERVIEW IDC_GEAR_SELECT_DROP Link to comment Share on other sites More sharing options...
Kind-Sir Posted August 30, 2013 Report Share Posted August 30, 2013 Update: Appears that this has been added in the 1.0.2 update. Got an idea for caching vehicle classnames to the classnames of the keys, then displaying what vehicle the key is used on. Link to comment Share on other sites More sharing options...
IrishMob Posted August 30, 2013 Author Report Share Posted August 30, 2013 That would be cool. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now