Checkboxes and RadioButtons are no longer firing click events when using the 3ra scenario.
Checkboxes and RadioButtons are no longer firing click event
Re: Checkboxes and RadioButtons are no longer firing click event
Steps:
Become admin (if gui doesn't appear, run /c create_admin_gui(game.player.name))
Open Character, and try to control run speed..
All events fire except these.
Uses
Event.register(defines.events.on_gui_click, gui_click) in admin.lua
runs line 68: starting here
Become admin (if gui doesn't appear, run /c create_admin_gui(game.player.name))
Open Character, and try to control run speed..
All events fire except these.
Uses
Event.register(defines.events.on_gui_click, gui_click) in admin.lua
runs line 68: starting here
Code: Select all
local function gui_click(event)
if not event.element then return end
local i = event.player_index
local p = game.players[i]
local e = event.element.name
p.print("Player: " .. i .. " - " .. p.name .. "; Element:" .. e) --<<<NOT SEEING THIS PRINTED
- Attachments
-
- 3ra_test_scenario.zip
- (1.65 MiB) Downloaded 119 times
Re: Checkboxes and RadioButtons are no longer firing click event
Thanks for the report. I believe this is intended. You should be using the http://lua-api.factorio.com/latest/even ... te_changed event for those GUI elements.
If you want to get ahold of me I'm almost always on Discord.
Re: Checkboxes and RadioButtons are no longer firing click event
I checked the lua-api and saw the following:
If that is the case, can we update the docs to include this change?
Thanks!
If that is the case, can we update the docs to include this change?
Thanks!
Re: Checkboxes and RadioButtons are no longer firing click event
Sure, I've updated the docs for the next version of 0.16.
If you want to get ahold of me I'm almost always on Discord.