|
Moab Beginner
Joined: 02 Aug 2008 Posts: 25
|
Posted: Sat Oct 29, 2011 3:44 pm
copy command and menu buttons |
1. I know I can ctl-c -that's great....but I would like to be able to right-click and have the copy option available from there. I take it I can add commands to the menu you get when you right-click. How do I do this?
2. I would like to be able to create a menu button that has button items under it like:
[magic]
[bolt of hellfire]
[surprise death]
[kick yer butt]
How do I do that? Thanks for any help! |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Sat Oct 29, 2011 4:30 pm |
There's an option in preferences under User Interface -> Window options to automatically copy highlighted text to the clipboard, so you don't even need to press CTRL+C. If you really want a copy option in the right-click menu, you can make one yourself using %clip and %selected. I'll leave that to you to figure out how to code
As for how to actually create the menu buttons, just go to New -> Menu in the package editor. The name is what you see in the right-click menu, the code is what you want to happen when you click it. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Oct 29, 2011 6:24 pm |
Menu buttons:
1)create new button, set as type Menu
2)in the Code box, type in the name of the class you wish to keep this button's menu options in
3)create the aforementioned class, and check the checkbox that says Submenu folder.
4)create new menu settings in this class
If you have submenus, you can do it the above way (the old, ZMud way) or you can do it via the New button (new menu, new submenu, new submenu, ...). |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Moab Beginner
Joined: 02 Aug 2008 Posts: 25
|
Posted: Sat Oct 29, 2011 8:53 pm |
Thanks!
Next question - I have a trigger that highlights on a regex pattern so I can colorize when someone is speaking to my character. Works fine - in that it highlightes the first line - but if the speaker goes on for two or three lines, how do I get the entire paragraph or whatever colorized. |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Sat Oct 29, 2011 11:32 pm |
Assuming you want to color everything up until the next blank line, you could do something like this:
Code: |
#TRIGGER {^* tells you: } {#CW red}
#COND {^(*)$} {#IF %len(%1) {#CW red;#STATE 1}} {within|param=1} |
If there's a different ending line, you could do pretty much the same thing except using %match to check if the line isn't your end line. For example, if you want to color everything up to your prompt:
Code: |
#TRIGGER {^* tells you: } {#CW red}
#COND {^(*)$} {#IF !%match(%1,"your prompt") {#CW red;#STATE 1}} {within|param=1} |
|
|
|
|
|
|