Hello. I have a problem with my CEF, my interface is not clickable. Input with keyboard working, but clicks not working.
My code in onClientRender
if (browserVisible == true) then
dbw = dxDrawImage(posX, posY, windowWidth, windowHeight, webBrowser, 0,
0, 0, tocolor(255, 255, 255, 245), true)
focusBrowser(webBrowser)
end
Browser showing code
if (getPedOccupiedVehicleSeat(localPlayer) == 0) then
browserVisible = true
showCursor(true)
guiSetInputEnabled(true)
showChat(false)
focusBrowser(webBrowser)
end
This is my onClientBrowserCreated code
addEventHandler("onClientBrowserCreated", webBrowser, function()
loadBrowserURL(webBrowser, url)
addEventHandler("onClientKey", getRootElement(), function(button)
if button == "mouse_wheel_down" then
injectBrowserMouseWheel(webBrowser, -40, 0)
elseif button == "mouse_wheel_up" then
injectBrowserMouseWheel(webBrowser, 40, 0)
end
end)
addEventHandler("onClientClick", getRootElement(), function(button, state)
if state == "down" then
injectBrowserMouseDown(webBrowser, button)
else
injectBrowserMouseUp(webBrowser, button)
end
end)
addEventHandler("onClientCursorMove", getRootElement(),
function(relativeX, relativeY, absoluteX, absoluteY)
injectBrowserMouseMove(webBrowser, absoluteX, absoluteY)
end)
end)