public void mousePressed(MouseEvent e) {
        // check every menu item in the current array to see if the click was within its bounds
        int mx = e.getX();
        int my = e.getY();
        
        for(int i = 0; i < cong.menu.mi.length; i++){
            if(mx >= cong.menu.mi[i].getX() && mx <= cong.menu.mi[i].getX() + Menu.ITEMWIDTH){
                if(my >= cong.menu.mi[i].getY() && my <= cong.menu.mi[i].getY() + Menu.ITEMHEIGHT){
                    // Pressed button
                    // Update the program state
                    cong.setState(cong.menu.mi[i].getAssignedState());
                    // Run any extra code
                    cong.menu.mi[i].clickAction();
                }
            }
        }
    }