gui-beta call 'flib_gui.hook_events' when it is load. I can't use my own event handler.
Solve by rewrite some code in flib-beta before using it
local gui = require("__flib__.gui-beta")
local Event = require('__stdlib__/stdlib/event/event')
local gui_event_defines = {}
for name, id in pairs(defines.events) do
if string.find(name, "^on_gui") then
gui_event_defines[name] = id
--event_id_to_string_mapping[id] = string.gsub(name, "^on_gui", "on")
end
end
function gui.hook_events(callback)
--local on_event = script.on_event
for _, id in pairs(gui_event_defines) do
--on_event(id, callback)
Event.register(id, callback)
end
end
`
Sorry for duplicating issue#19.
gui-beta call 'flib_gui.hook_events' when it is load. I can't use my own event handler.
Solve by rewrite some code in flib-beta before using it