local function handle_click(url, action_id, action)
label.set_text("/four_boxes/go#label", tostring(url))
if action.released then
print("Dokundu")
end
end
function init(self)
msg.post(".", "acquire_input_focus")
msg.post("@render:", "clear_color", { color = vmath.vector4(95 /256, 129 / 256, 161 / 256, 1 ) })
self.tiklandimi = false
go.set("#sprite", "scale", vmath.vector3(1.5, 1.5, 1))
goput.add("/four_boxes/harfler1#sprite", nil, handle_click)
goput.add("/four_boxes/harfler2#sprite", nil, handle_click)
goput.add("/four_boxes/harfler3#sprite", nil, handle_click)
goput.add("/four_boxes/harfler4#sprite", nil, handle_click)
end
function on_message(self, message_id, message)
if message_id == hash("collision_response") and self.tiklandimi == false then
go.set(".", "scale", vmath.vector3(0.15, 0.15, 0))
self.tiklandimi = true
end
end
function update(self, dt)
if message_id ~= hash("collision_response") then
go.set(".", "scale", vmath.vector3(0.1, 0.1, 0))
self.tiklandimi = false
end
end
function final(self)
msg.post(".", "release_input_focus")
goput.remove("/four_boxes/harfler1#sprite")
goput.remove("/four_boxes/harfler2#sprite")
goput.remove("/four_boxes/harfler3#sprite")
goput.remove("/four_boxes/harfler4#sprite")
end
function on_input(self, action_id, action)
return goput.on_input(action_id, action)
end
Dont write when i click object “Dokundu”