Hello everybody,
I want to set the HoverTexture of a button to be the same as the NormalTexture but in a different color.
Unfortunately, the texture seems to remain unchanged on hovering (The hover event is handled properly, I tried with a different texture
).
How can I get a texture colored?
I want to set the HoverTexture of a button to be the same as the NormalTexture but in a different color.
Unfortunately, the texture seems to remain unchanged on hovering (The hover event is handled properly, I tried with a different texture
).How can I get a texture colored?
Code (cpp) Select
tgui::Button::Ptr button = std::make_shared<tgui::Button>();
...
tgui::Texture texture;
texture.load(...);
texture.setColor( sf::Color(255, 0, 0) );
button->getRenderer()->setHoverTexture(texture);