void ElementButton::Update(GameManager * gm) { Enabled = false; SetTint(sf::Color::White); if (gm->MouseState.LeftMouseState == 1) { if (PointInsideElement(gm->MouseState.MousePosition)) { SetTint(sf::Color::Blue); } } if (gm->MouseState.LeftMouseState == 2) { if (PointInsideElement(gm->MouseState.MousePosition)) { SetTint(sf::Color::Black); Enabled = true; //Activated } } }
// |----------------------------------------------------------------------------| // | SetColor | // |----------------------------------------------------------------------------| void Text::SetColor(float r, float g, float b) { SetTint(r,g,b,1.0f); }