Kingsley1997 39 Posted July 10, 2016 There's a bunch of menu commands (listed below) that have no documentation on the wiki. Are these commands discontinued or still a work in progress? Currently unable to get these to work. They would be very useful for a mod I'm making. menuAdd menuData menuSetData menuText menuPicture menuSetPicture menuAction menuSetAction menuCollapse menuExpand menuDelete menuEnable menuEnabled menuHover menuSetCheck menuSetValue menuURL menuValue Share this post Link to post Share on other sites
kylania 568 Posted July 10, 2016 The blub from SPOTREP #00052 says this: Added: CT_MENU and CT_MENU_STRIP control types. See CtrlMenu and CtrlMenuStrip base classes for supported config properties. The UI element can be controlled by following script commands: So something to do with Eden Editor configs? Share this post Link to post Share on other sites
Kingsley1997 39 Posted July 10, 2016 Hmm so does that mean they're only usable inside the Eden display? Share this post Link to post Share on other sites
kylania 568 Posted July 10, 2016 Seems to be specifically for the Eden Editor. Share this post Link to post Share on other sites
R3vo 2654 Posted July 10, 2016 All control types used in Eden can basically also be used in any other display. Share this post Link to post Share on other sites
kylania 568 Posted July 10, 2016 All control types used in Eden can basically also be used in any other display. Got any examples of that perhaps? :) Share this post Link to post Share on other sites
R3vo 2654 Posted July 10, 2016 Not really, I am mostly using combo boxes, toolboxes and checkboxes for my 3den mod. Share this post Link to post Share on other sites
Kingsley1997 39 Posted July 11, 2016 class MARS_gui_ctrlMenu: ctrlMenu { colorBorder[] = {0,0,0,0}; colorBackground[] = {0,0,0,1}; colorText[] = {COLOR_TEXT_RGBA}; colorSelect[] = {0,0,0,1}; colorSelectBackground[] = {COLOR_ACTIVE_RGBA}; colorDisabled[] = {COLOR_TEXT_RGB,0.25}; colorPicture[] = {1,1,1,1}; colorPictureSelect[] = {0,0,0,1}; colorPictureDisabled[] = {1,1,1,0.5}; arrow = "\a3\3DEN\Data\Controls\ctrlMenu\arrow_ca.paa"; class Items { class Default { text = "Empty"; data = "Empty"; enable = 0; }; }; }; private _display = (findDisplay 46) createDisplay "mars_editor_interface"; private _control = _display ctrlCreate ["MARS_gui_ctrlMenu", 123456]; _control ctrlSetPosition [ getMousePosition select 0, getMousePosition select 1 ]; private _path = _control menuAdd [[], "Option 1"]; _control ctrlCommit 0; systemChat str (_control menuSize []); "Option 1" is never added and menuSize remains 0. Share this post Link to post Share on other sites
Kingsley1997 39 Posted July 11, 2016 When hard-coding items (as shown below), they appear as expected, but not with menuAdd. class Items { items[] = {One,Two,Three}; class One { text = "One"; data = "One"; value = 0; }; class Two { text = "Two"; data = "Two"; value = 1; }; class Three { text = "Three"; data = "Three"; value = 2; }; class Default { text = "Empty"; data = "Empty"; enable = 0; }; }; Share this post Link to post Share on other sites
kylania 568 Posted July 11, 2016 This is about the only other mention of those commands I'm finding. Share this post Link to post Share on other sites
Kingsley1997 39 Posted July 11, 2016 This is about the only other mention of those commands I'm finding. Here's the feedback ticket for it: https://feedback.bistudio.com/T116695 Share this post Link to post Share on other sites
R3vo 2654 Posted July 11, 2016 The commands were added to the wiki today. https://community.bistudio.com/wiki/Special:RecentChanges 1 Share this post Link to post Share on other sites
Tom_48_97 523 Posted July 11, 2016 The commands were added to the wiki today. https://community.bistudio.com/wiki/Special:RecentChanges This isn't final, I will give the final touch this week. :292: 3 Share this post Link to post Share on other sites
Kingsley1997 39 Posted July 12, 2016 This isn't final, I will give the final touch this week. :292: Awesome :D Any update on T116695? Share this post Link to post Share on other sites
dna_uk 30 Posted August 22, 2016 Even on the latest dev branch the menu scripting commands do not work on a CT_MENU control, only CT_MENU_STRIP. Feedback tracker is yet to have any response on the issue: T116695. Share this post Link to post Share on other sites
hoverguy 177 Posted August 23, 2016 Menu commands work fine: systemChat str (menuSize[2700, []]) // Alternative systemChat str (((findDisplay 2500) displayCtrl 2700) menuSize []) Says 4 for both in chat as expected (I have 4 menus). // Let's say I only have one parent menu called Menu 1 _subMenu0 = _myMenuCtrl menuAdd [[0],"Sub Menu 0 of Menu 1"]; _myMenuCtrl menuAdd [[0,_subMenu0],"Sub Menu 0 of Sub Menu 0 of Menu 1"]; _subMenu1 = _myMenuCtrl menuAdd [[1],"Sub Menu 1 of Menu 1"]; _menu2 = _myMenuCtrl menuAdd [[],"Menu 2"]; /* Menu 1 | Menu 2 |- Sub Menu 0 | |- Sub Menu 0 of Sub Menu 0 of Menu 1 |- Sub Menu 1 */ They do work exactly the same way as tree family commands (tvAdd, tvCount etc...), if you know how to mess with CT_TREE control you're gold.For more infos unpack 3den.pbo and check fn_3DENInterface.sqf located in the Functions folder. CT_MENU & CT_MENU_STRIP controls can be found in the UI\Controls folder (ctrlMenu.hpp & ctrlMenuStrip). Now we can make nice context menus :) Sent from phone. 1 Share this post Link to post Share on other sites