Sub menu for a sub menu?

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.

Like this?

Yep exactly like that!

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.

Okay - I have to dig it up so give me a minute.

1 Like

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

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

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