- Documentation
- Client functions
- getBrowserPixelAlpha
Function
getBrowserPixelAlpha
Returns the opacity of a page pixel. Useful for letting clicks on transparent parts of a HUD go through to the game.
Syntax
int getBrowserPixelAlpha(browser webBrowser, int x, int y)Arguments
webBrowserbrowser- The browser.
xint- X position in page pixels.
yint- Y position in page pixels.
Returns
Opacity 0-255, or -1 outside the image.
Example
addEventHandler("onClientClick", root, function(button, state, cx, cy)
if getBrowserPixelAlpha(browser, cx, cy) > 0 then
if state == "down" then injectBrowserMouseDown(browser, button) else injectBrowserMouseUp(browser, button) end
end
end)