protected void onMoveEvent(float dx, float dy) {
        switch (getPosition()) {
            case LEFT:
                setOffsetPixels(Math.min(Math.max(mOffsetPixels + dx, 0), mMenuSize));
                break;

            case RIGHT:
                setOffsetPixels(Math.max(Math.min(mOffsetPixels + dx, 0), -mMenuSize));
                break;

            case TOP:
                setOffsetPixels(Math.min(Math.max(mOffsetPixels + dy, 0), mMenuSize));
                break;

            case BOTTOM:
                setOffsetPixels(Math.max(Math.min(mOffsetPixels + dy, 0), -mMenuSize));
                break;
        }
    }
Offsets the menu relative to its original position based on the position of the content.

@param offsetPixels The number of pixels the content if offset.
menudrawer/src/net/simonvt/menudrawer/SlidingDrawer.java