mirror of
https://github.com/defold/extension-websocket.git
synced 2025-06-27 01:47:42 +02:00
Update websocket.gui_script
This commit is contained in:
parent
ace3242158
commit
63cb5f8de6
@ -1,4 +1,5 @@
|
|||||||
local URL="://echo.websocket.org"
|
local URL = "echo.websocket.org"
|
||||||
|
|
||||||
local function click_button(node, action)
|
local function click_button(node, action)
|
||||||
return gui.is_enabled(node) and action.pressed and gui.pick_node(node, action.x, action.y)
|
return gui.is_enabled(node) and action.pressed and gui.pick_node(node, action.x, action.y)
|
||||||
end
|
end
|
||||||
@ -88,7 +89,7 @@ end
|
|||||||
local function connect(self, scheme)
|
local function connect(self, scheme)
|
||||||
local params = {}
|
local params = {}
|
||||||
|
|
||||||
self.url = scheme .. URL
|
self.url = scheme .. "://" .. URL
|
||||||
log("Connecting to " .. self.url)
|
log("Connecting to " .. self.url)
|
||||||
self.connection = websocket.connect(self.url, params, websocket_callback)
|
self.connection = websocket.connect(self.url, params, websocket_callback)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user