public bool MouseDown(int x, int y) { if (isReadOnly) { return false; } if (x >= xPos && x < xPos + width && y >= yPos && y < yPos + height) { pressed = true; return true; } return false; }