the 'e' variable (Text) is destroyed when the function ends, so there is no text at all to draw.
also, you don't have a font attached to the Text. and the text itself is not being drawn to any window.
thanks, that helpd. Now function looks like this
Text loadClass::buttonColor(Text e, int a, int b, int c, int d, RenderWindow& window )
{
if (IntRect(a, b, c, d).contains(Mouse::getPosition(window)))
{
e.setFillColor(Color::Yellow);
}
else
{
e.setFillColor(Color::White);
}
return e;
}
also it needs to be in rendering function