Is it possible to create a sub menu for an Extensions sub menu in ruby?
CUIN = UI::Command.new('cuin') { cmd_cuin() }
cmd_menu = UI.menu('Plugins').add_submenu('Commands')
unit_menu = UI.menu('Commands').add_submenu('Units')
unit_menu.add_item(CUIN)
Thanks.
3DxJFD
April 22, 2023, 4:22pm
4
My code is an abomination and I hesitate to share it here because it could mislead more than help… but I can share it with you if you’d like.
That would be great just need a point in the right direction, just PM me.
3DxJFD
April 22, 2023, 4:25pm
6
Okay - I have to dig it up so give me a minute.
1 Like
3DxJFD
April 22, 2023, 4:38pm
7
IDK_Programming module coming your way!
1 Like
Here it is for anyone interested:
if !defined?(@loaded)
menu = UI.menu('Plugins')
submenu = menu.add_submenu('1st Level')
#SUBMENU LEVEL 2
sub_submenu = submenu.add_submenu('2nd Level')
#SUBMENU LEVEL 3
sub_submenu.add_item('3rd Level') { puts 'Victory!' }
@loaded = true
end
2 Likes
3DxJFD
April 22, 2023, 5:23pm
9
Here is a similar form (Menu, SubMenu, Toolbar), plus toolbar launch from SubMenu.
1 Like
OOOOH! Fancy, lots of functional possibilities there for sure. My next big step is learning the html dialog to make my own interface(s).
1 Like
3DxJFD
April 22, 2023, 5:37pm
11
I couldn’t figure the html dialog out. That’s how I ended-up on the road to madness shown in the images. And in the code you saw (I hope you’re alright after seeing it).
Here’s how this one looks with some of the toolbars open. Let me know if you’d like the (grizzly but commented) code.
Please tag me if you put any demos of html dialog up.
1 Like