Yes, I did. last time I had to put something before it was a web socket library.
My code to eliminate doubts:
function init(self)
msg.post(".", "acquire_input_focus")
msg.post("@render:", "use_fixed_fit_projection", { near = -1, far = 1 })
end
local player_feedback_url = "http://www.defold.com"
local function webview_callback(self, webview_id, request_id, type, data)
if type == webview.CALLBACK_RESULT_URL_ERROR then
-- An error occurred!
-- Let's close the webview and set a label with some helpful text!
webview.destroy(webview_id)
label.set_text("#label", "Player feedback not available at this moment.")
elseif type == webview.CALLBACK_RESULT_URL_LOADING then
-- Make sure the player isn't navigating away from the feedback URL.
if data.url ~= player_feedback_url then
return false
end
end
end
local feedback_webview = webview.create(webview_callback)
webview.open(feedback_webview, player_feedback_url)
webview.set_visible(feedback_webview, 1)
webview.set_position(feedback_webview, 0, 0, -1, 500)