KrysleQuinsen
Member
|
New Menu.func(MenuPush) problem
Hi, just update the engine to the latest version and I have some problem with the new Menu.func() using MenuPush class instead of the original Str which I heavily using.
Right now MenuPush currently uses Node<MenuElm> 'display_name' instead of 'name' which is for code commands.
Code:
Node<MenuElm> n;
n.New().create("aa"); //output is "aa" | abs=0
n.New().create("bb").display("bbbbbbbbbbb"); // output is "bbbbbbbbbbb" | abs=1
n.New().create("cc").display("wsad"); // output is "wsad" | abs=2
Node<MenuElm> &c=(n+="main");
c.New().create("sub").display("display"); // output is [0]"main" [1]"display" | abs=3
menu.create();
menu.setData(n);
menu.func(menupush_test);
Also, is it possible to have MenuPush() to return the old value like "main\\sub"? it is not that important but just for convenience not to change every line of the code.
Edit: Nevermind the second request, I forget it is MemPtr<MenuPush>
(This post was last modified: 08-19-2021 08:50 AM by KrysleQuinsen.)
|
|
08-19-2021 08:05 AM |
|
Esenthel
Administrator
|
RE: New Menu.func(MenuPush) problem
|
|
08-19-2021 09:12 AM |
|