EDIT: Whoops, Laurent got it first.
You could make your own constructor. Something like:
MenuItem(int left, int top, int width, int height, eButtonAction myaction)
{
rect.left = left;
rect.top = top;
rect.width = width;
rect.height = height;
action = myaction
}
Or more efficiently, with a constructor using an initialization list and a sf::Rect<int> as a parameter:
MenuItem(const sf::Rect<int>& myrect, eButtonAction myaction):
rect(myrect),
action(myaction)
{
}
Then you could create an object like this:
MenuItem playButton(110, 265, 200, 50, RT_PLAY)
or with the second constructor:
MenuItem playButton(sf::Rect<int>(110, 265, 200, 50), RT_PLAY)