montoyo / mcef

Minecraft ChromiumEF (based on JCEF)
Other
193 stars 86 forks source link

Scroll is not working #20

Closed orange4glace closed 7 years ago

orange4glace commented 7 years ago
            if(browser != null) { //Inject events into browser. TODO: Handle mods & leaving.
                int y = mc.displayHeight - sy - scaleY(20); //Don't forget to flip Y axis.

                if(btn == -1)
                    browser.injectMouseMove(sx, y, 0, y < 0);
                else
                    browser.injectMouseButton(sx, y, 0, btn + 1, pressed, 1);
                browser.injectMouseWheel(sx, y, 0, Mouse.getEventDWheel(), 1);
            }

I think this should work but it doesn't :(

orange4glace commented 7 years ago

I don't know why but it's working now :)