Checkboxes and RadioButtons are no longer firing click event

Bugs that are actually features.
Post Reply
Pirion
Inserter
Inserter
Posts: 49
Joined: Mon Oct 03, 2016 12:07 am
Contact:

Checkboxes and RadioButtons are no longer firing click event

Post by Pirion »

Checkboxes and RadioButtons are no longer firing click events when using the 3ra scenario.

Image

Pirion
Inserter
Inserter
Posts: 49
Joined: Mon Oct 03, 2016 12:07 am
Contact:

Re: Checkboxes and RadioButtons are no longer firing click event

Post by Pirion »

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

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 96 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Checkboxes and RadioButtons are no longer firing click event

Post by Rseding91 »

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.

Pirion
Inserter
Inserter
Posts: 49
Joined: Mon Oct 03, 2016 12:07 am
Contact:

Re: Checkboxes and RadioButtons are no longer firing click event

Post by Pirion »

I checked the lua-api and saw the following:

Image

If that is the case, can we update the docs to include this change?

Thanks!

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Checkboxes and RadioButtons are no longer firing click event

Post by Rseding91 »

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.

Post Reply

Return to “Not a bug”