Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Suggestions
➜ windowmenu sub-menus
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Wed 14 Apr 2010 10:11 PM (UTC) |
Message
| WindowMenu's flatness leads to an inability to organize the menu structure. It would be nice if selection of certain menu items, rather than returning, instead popped up another level of nested options. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Bast
(78 posts) Bio
|
Date
| Reply #1 on Wed 30 Jun 2010 09:31 PM (UTC) |
Message
| I would like to see something like this too.
Maybe have a + in front to make it under the item that was previous to it with a higher level.
So If I had something like this:
"|| Font || +Set font | +Increase font size | +Decrease font size | +Default Font ||| Colours | +Background Colour | +Text Colour"
It would appear like this
----
Font -> on mouseover, submenu of Set Font, Increase, etc
----
Colours -> on mouseover, submenu of Background Colour, Text etc..
----
How hard would that be to do Nick?
Bast |
Bast
Scripts: http://github.com/endavis | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #2 on Wed 30 Jun 2010 09:39 PM (UTC) |
Message
| I'm on holidays right now so I can't check the source code or try it out. Remind me in a few days if I don't reply again by 5th July or thereabouts. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #3 on Tue 06 Jul 2010 11:05 PM (UTC) |
Message
| Version 4.52 adds sub-menus.
You can nest menus by doing something like this:
Item = "Take | Drop | >Eat | With Fork | With Hands | < | >Emote | Smile | Laugh "
This would display:
Take
Drop
Eat ->
..With Fork
..With Hands
Emote ->
..Smile
..Laugh
(Where Eat and Emote are nested menus)
Nested menus can have further nested menus. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #4 on Wed 07 Jul 2010 02:35 AM (UTC) |
Message
|  |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Bast
(78 posts) Bio
|
Date
| Reply #5 on Wed 07 Jul 2010 09:11 PM (UTC) |
Message
| Works and looks great! Thanks Nick!
Bast |
Bast
Scripts: http://github.com/endavis | Top |
|
Posted by
| Mr.lundmark
(51 posts) Bio
|
Date
| Reply #6 on Sun 17 Oct 2010 03:45 PM (UTC) |
Message
| Sub-menus are great but there's a problem with them.
If you have three menu choices:
A, B and C.
Each of these three choices has a sub-menu. All those three choices have the same type of sub-menu, the choices D and E. A practical example is having a list of objects 0 .. n that you want to do either action D or E on.
Upon return, I will always receive D or E no matter if the menu-choice A, B or C was selected to get to the sub-menus. If that makes sense.
To explain it in another way:
Menu
.A
..D
..E
.B
..D
..E
.C
..D
..E
I want to know if it was a A-D, B-D or C-D choice that was made. Not simply a "D" choice. Is that possible somehow? If not, could we please have it added :) | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #7 on Sun 17 Oct 2010 06:38 PM (UTC) Amended on Sun 17 Oct 2010 06:41 PM (UTC) by Fiendish
|
Message
|
Quote:
Menu
.A
..D
..E
.B
..D
..E
.C
..D
..E
I want to know if it was a A-D, B-D or C-D choice that was made. Not simply a "D" choice. Is that possible somehow? If not, could we please have it added
I just recently had this problem too, and I solved it by making all of the strings unique. Like if A and B are "Sword" and "Axe" and "D" and "E" want to be "Swing" and "Drop", I made them "Swing Axe"/"Swing Sword" and "Drop Axe"/"Drop Sword". But a better solution would be to return an index as the result of a menu selection instead of a string.
Is there something wrong with quoting in the forum now? It took me like 10 tries to get this quote to work. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #8 on Sun 17 Oct 2010 07:30 PM (UTC) |
Message
| There is some problem with characters with the high-order bit on. Not sure what started it, but maybe when I updated the MySQL database engine. Will look into it.
Will also look into the menus, but see how I can do it without breaking backwards compatibility. If not, hopefully not too many people are using submenus right now. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #9 on Sun 17 Oct 2010 07:39 PM (UTC) |
Message
|
Nick Gammon said:
Will also look into the menus, but see how I can do it without breaking backwards compatibility.
Return two values like loadfile does. The current string return goes in the first one, and the index goes in the second one. That should keep compatibility with code that only expects a single return because the first gets used and the second gets tossed (I think). |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Twisol
USA (2,257 posts) Bio
|
Date
| Reply #10 on Sun 17 Oct 2010 08:11 PM (UTC) |
Message
| An alternative might be adding a new GetInfo selector that returns the index of the most recent menu selection. No backwards compatibility problems there. |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #11 on Sun 17 Oct 2010 08:16 PM (UTC) |
Message
|
Twisol said:
An alternative might be adding a new GetInfo selector that returns the index of the most recent menu selection. No backwards compatibility problems there.
That would be an extremely ugly use of GetInfo that violates all sorts of code design rules. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Twisol
USA (2,257 posts) Bio
|
Date
| Reply #12 on Sun 17 Oct 2010 08:18 PM (UTC) Amended on Sun 17 Oct 2010 08:20 PM (UTC) by Twisol
|
Message
| No arguments there. (Also, I meant WindowInfo, since we're taking about miniwindow menus.) |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #13 on Sun 17 Oct 2010 08:40 PM (UTC) |
Message
| Since I want to have backwards compatibility, and don't want to add another argument, how about some special prefix, eg. "!" in front of the whole string? If present, you get an index back instead of a string (eg. 1, 2, 3).
Failing that, just another function like WindowMenuIndex or something. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #14 on Sun 17 Oct 2010 09:14 PM (UTC) |
Message
|
Nick Gammon said:
Since I want to have backwards compatibility, and don't want to add another argument, how about some special prefix, eg. "!" in front of the whole string? If present, you get an index back instead of a string (eg. 1, 2, 3).
Failing that, just another function like WindowMenuIndex or something.
Would a second return value as given by loadfile not satisfy the requirements? |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
72,511 views.
This is page 1, subject is 2 pages long: 1 2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top