1
General / messing up with key events <_<
« on: January 29, 2012, 02:27:09 pm »
Hi guys, what am I doing wrong?
compiles with this error:
The Event object is obviously sf::Event Event..
Code: [Select]
switch(Event.KeyEvent.Code)
{
case sf::Key::Code::Num1:
{
SelectedColor=Black;
break;
}
case sf::Key::Code::Num2:
{
SelectedColor=Blue;
break;
}
}
compiles with this error:
Quote
invalid use of ‘struct sf::Event::KeyEvent’
The Event object is obviously sf::Event Event..