Sorry, we don't support your browser.  Install a modern browser

Add full Lua Player reference to onScriptingButtonUp / onScriptingButtonDown functions#820

Currently, the onScriptingButtonUp and onScriptingButtonDown events only provide index and player_color arguments.

With a full Player class instead of just a color reference, it would be possible to utilize scripting buttons for individual spectators instead of the current all-or-nothing approach.

To maintain existing functionality, Player could just be added as a third argument.

3 years ago

Can spectators press buttons?

3 years ago

Yes, spectators can press scripting buttons and interact with custom UI elements (e.g. the UI class and XML stuff).

They are only restricted from interacting with game objects and classic UI buttons/inputs.

3 years ago
1

Ideally, add it as a 3rd argument for the event. This addition shouldn’t break previous mods that use onScriptiongButtonUp and onScriptiongButtonDown

3 years ago