[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Suggestions
. . -> [Subject]  windowmenu sub-menus
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

windowmenu sub-menus

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Pages: 1 2  

Posted by Fiendish   USA  (1,641 posts)  [Biography] 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
[Go to top] top

Posted by Bast   (77 posts)  [Biography] 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://bastmush.googlecode.com
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[Go to top] top

Posted by Bast   (77 posts)  [Biography] bio
Date Reply #5 on Wed 07 Jul 2010 09:11 PM (UTC)
Message
Works and looks great! Thanks Nick!

Bast

Bast

Scripts: http://bastmush.googlecode.com
[Go to top] top

Posted by Mr.lundmark   (46 posts)  [Biography] 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 :)
[Go to top] top

Posted by Fiendish   USA  (1,641 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[Go to top] top

Posted by Fiendish   USA  (1,641 posts)  [Biography] 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
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] 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
[Go to top] top

Posted by Fiendish   USA  (1,641 posts)  [Biography] 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
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[Go to top] top

Posted by Fiendish   USA  (1,641 posts)  [Biography] 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
[Go to top] 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.


17,814 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]