Adding a context menu option via lua

Discussion of Lua and LuaWML support, development, and ideas.

Moderators: Forum Moderators, Developers

Post Reply
Choicerer
Posts: 133
Joined: April 29th, 2017, 11:37 pm

Adding a context menu option via lua

Post by Choicerer » December 9th, 2017, 5:50 pm

I want people to be able to access a rigt-click menu item while another player is playing their turn in multiplayer. The WML [Set_Menu_Item] function doesn't allow it. Is there a way to do this with lua?
Creator of Choicerer's Map Randomizer - http://bit.ly/2GNcnuv Better Odds - http://bit.ly/2HP41ln
The Better Names Mod - http://bit.ly/2ICIGwz
Curse of Satan Claus -http://bit.ly/2pq6MSg The Trolling Mod - http://bit.ly/2GbpAiO
Randomized Isar Map Pack and the Mushroom Isar.

User avatar
Ravana
Moderator
Posts: 1603
Joined: January 29th, 2012, 12:49 am
Location: Estonia

Re: Adding a context menu option via lua

Post by Ravana » December 9th, 2017, 6:52 pm

With 1.13 there is support for it. 1.12 needs hacky solutions like EoHS and ageless use.

Choicerer
Posts: 133
Joined: April 29th, 2017, 11:37 pm

Re: Adding a context menu option via lua

Post by Choicerer » December 9th, 2017, 7:11 pm

I'll take a look at them, then. Thanks!
Creator of Choicerer's Map Randomizer - http://bit.ly/2GNcnuv Better Odds - http://bit.ly/2HP41ln
The Better Names Mod - http://bit.ly/2ICIGwz
Curse of Satan Claus -http://bit.ly/2pq6MSg The Trolling Mod - http://bit.ly/2GbpAiO
Randomized Isar Map Pack and the Mushroom Isar.

User avatar
Sapient
Developer
Posts: 4411
Joined: November 26th, 2005, 7:41 am
Contact:

Re: Adding a context menu option via lua

Post by Sapient » December 11th, 2017, 4:05 pm

"You can open this menu by clicking and rightclicking your unit quickly"
https://github.com/ProditorMagnus/Agele ... d_menu.cfg
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."

Choicerer
Posts: 133
Joined: April 29th, 2017, 11:37 pm

Re: Adding a context menu option via lua

Post by Choicerer » December 28th, 2017, 10:11 pm

I've only just noticed this post now. Thanks! Ravana had told me about the menu, too, but in the end I settled for another solution.
Creator of Choicerer's Map Randomizer - http://bit.ly/2GNcnuv Better Odds - http://bit.ly/2HP41ln
The Better Names Mod - http://bit.ly/2ICIGwz
Curse of Satan Claus -http://bit.ly/2pq6MSg The Trolling Mod - http://bit.ly/2GbpAiO
Randomized Isar Map Pack and the Mushroom Isar.

Post Reply