Does collectionproxy create new input stack? Trying to make camera scroll logic:
- If input below gui(button) - don’t do anything
- If input doesn’t below gui(button) - scroll.
Input passes through gui within collectionproxies.
main.collection
- main
- script
- collectionproxy(gui)
- camera
- camera
main.script
function init(self)
msg.post(".", "acquire_input_focus")
msg.post("#collectionproxy", "load")
end
function on_input(self, action_id, action)
if action_id == hash("touch") and action.pressed then
local world = camera.screen_to_world(vmath.vector3(action.screen_x, action.screen_y,0))
go.set_position(world, "/camera")
end
end
function on_message(self, message_id, message, sender)
if message_id == hash("proxy_loaded") then
msg.post(sender, "init")
msg.post(sender, "enable")
end
end
gui.script
local druid = require("druid.druid")
function init(self)
self.druid = druid.new(self)
self.druid:new_button("box")
end
function final(self)
self.druid:final()
end
function update(self, dt)
self.druid:update(dt)
end
function on_message(self, message_id, message, sender)
self.druid:on_message(message_id, message, sender)
end
function on_input(self, action_id, action)
return self.druid:on_input(action_id, action)
end
On top of my head there’s only one possible solution: remake gui using factories or collectionfactories.