Page 2 of 6

Re: Add sub-menu support for scripts

Posted: 28 Oct 2016 13:31
by highend
That would be a great start but all kinds of icons would be even better (but I'm afraid that's not possible?)
E.g: From executables, .dll's (with /index) like a multi-script is capable of

Re: Add sub-menu support for scripts

Posted: 28 Oct 2016 13:36
by admin
Here is the current state of affairs. Pretty cool IMO. 8)

item argument has now up to 4 sections: caption;data;icon;state

icon: e.g. ":paper" for the paper folder toolbar icon

state 1 = default (bold)
state 2 = checked
state 4 = disabled


EXAMPLE:

Script:

Code: Select all

$menu = <<<MENU
A1
 B1;;:paper
 B2
  Ca1
 B3
  Cb1;;:paper;2
  Cb2;;;4
  -
  Cb3;Cb3Data;;3
 -
 B4
A2;;:minitree
-
A3
MENU;

  text popupnested($menu);
Resulting Menu:

Re: Add sub-menu support for scripts

Posted: 28 Oct 2016 13:38
by highend
Actually, yeah, that looks really cool! :appl:

"icon" can only use toolbar icons then?

Re: Add sub-menu support for scripts

Posted: 28 Oct 2016 14:50
by admin
OK, full icon support just added. :biggrin:

Re: Add sub-menu support for scripts

Posted: 28 Oct 2016 14:52
by highend
*dances*

Cool stuff & a great addition to XY's scripting capabilities!!

Re: Add sub-menu support for scripts

Posted: 28 Oct 2016 16:46
by klownboy
I'm not speaking for highend, but ideally it would be best to be able to use either an internal XYplorer icon or a icon specified by full path/name or <xyicons>.
I'm late as usual... :biggrin:

Re: Add sub-menu support for scripts

Posted: 28 Oct 2016 16:54
by admin
All coming, and more. :cup:

Re: Add sub-menu support for scripts

Posted: 28 Oct 2016 19:19
by Marco
Any chance I can "chain" several popupmainmenu() so to create one button that can substitute the menubar?

Re: Add sub-menu support for scripts

Posted: 28 Oct 2016 19:31
by admin
Hm, I don't think so.

Re: Add sub-menu support for scripts

Posted: 28 Oct 2016 20:38
by highend
Implemented in UMC :mrgreen:

And no, this is not the native XY context menu :biggrin:
UMC.gif

Re: Add sub-menu support for scripts

Posted: 29 Oct 2016 01:27
by zhaowu
Will this
popupnested
functionality apply to multi-line script popup menu in the future? :tup:

Explanation:

Syntax rules for XYplorer Script Files
(3) You can have more than one script inside a script file. In that case, loading the script file will pop up a menu presenting all scripts inside the script file by their captions.

"Caption|Icon|State : Label" Script
Suppose a new field SubMenuLevel is added like this
"Caption|Icon|State|SubMenuLevel : Label" Script
. Loading the script file can pop up a nested menu.

Re: Add sub-menu support for scripts

Posted: 29 Oct 2016 01:41
by highend
Somehow I don't understand the question...

Re: Add sub-menu support for scripts

Posted: 29 Oct 2016 07:55
by Filehero
Cool!



No, great! :D :D :beer: :appl:

Re: Add sub-menu support for scripts

Posted: 29 Oct 2016 09:00
by admin
zhaowu wrote:Will this
popupnested
functionality apply to multi-line script popup menu in the future? :tup:
It's not immediately planned, but passing SubMenuLevel is a good idea. :tup: So, maybe later...

Re: Add sub-menu support for scripts

Posted: 29 Oct 2016 10:22
by LittleBiG
admin wrote:
zhaowu wrote:Will this
popupnested
functionality apply to multi-line script popup menu in the future? :tup:
It's not immediately planned, but passing SubMenuLevel is a good idea. :tup: So, maybe later...
Do I understand well? Would it give the possibility like changing a checked menu item to unchecked and vica versa, (seemingly) without leaving the menu? Or am I completely wrong here?