srcimon / screwbox

Minimalist 2D Java game engine. Result of covid lockdown.
MIT License
8 stars 0 forks source link

Prevent mouse from opening dock or taskbar (prototype inside) #335

Open srcimon opened 4 months ago

srcimon commented 4 months ago

Robot r = getRobot();

private static Robot getRobot()  {
    try {
        return new Robot();
    } catch (AWTException e) {
        throw new RuntimeException(e);
    }
}

@Override
public void update() {
    if(position.y() < 4) {
        r.mouseMove(position.x(), 4);
    }