Exemple #1
0
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
		}
	}
}
Exemple #2
0
// |----------------------------------------------------------------------------|
// |                               SetColor                                     |
// |----------------------------------------------------------------------------|
void Text::SetColor(float r, float g, float b)
{
	SetTint(r,g,b,1.0f);
}