Dynamically altering menu item description, hooking right-click event
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
-
- Posts: 54
- Joined: May 22nd, 2008, 2:45 am
Dynamically altering menu item description, hooking right-click event
Hello,
I'm playing with Wesband/Weshack and I would like a top-level menu item who's description changes dynamically based upon data about the hex of the mouse-down. I didn't see anything in EventWML and I've seen posts that suggest you can't hook it in lua? Can anybody tell me how I can run some code and dynamically alter the text (and maybe icon) of a context menu?
I'm playing with Wesband/Weshack and I would like a top-level menu item who's description changes dynamically based upon data about the hex of the mouse-down. I didn't see anything in EventWML and I've seen posts that suggest you can't hook it in lua? Can anybody tell me how I can run some code and dynamically alter the text (and maybe icon) of a context menu?
Re: Dynamically altering menu item description, hooking right-click event
I don't think its really possible to so this via a hook, the only way i currently see to to it is to re-create the whole menu items on a mouse-move-over (lua) event and those also have some problems.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Re: Dynamically altering menu item description, hooking right-click event
See if delayed variables do what you need. $|
-
- Posts: 54
- Joined: May 22nd, 2008, 2:45 am
Re: Dynamically altering menu item description, hooking right-click event
I see. Thank you both. I think I'll wait on that feature for now as it looks challenging.
I'm hacking Wesband/Weshack and I want to add a top-level contextual menu item for "loot all items" that only appears when there's items to loot, but that also summarizes what's items are on the tile's stack. I suppose that could be done with mouse-over lua and delayed variable expansion, but I don't know what the CPU cost would be of it. I'm putting this a little lower on my list, as I can at least do it from a subsequent message [option], so there are at least fewer clicks required than current.
I'm hacking Wesband/Weshack and I want to add a top-level contextual menu item for "loot all items" that only appears when there's items to loot, but that also summarizes what's items are on the tile's stack. I suppose that could be done with mouse-over lua and delayed variable expansion, but I don't know what the CPU cost would be of it. I'm putting this a little lower on my list, as I can at least do it from a subsequent message [option], so there are at least fewer clicks required than current.