Hello,
I'm sure i'm doing something stupid, i tried many combinations without success, certainly a syntax mistake but can't figure out what do do
the problem is that the
if (event.key.control)
is always true event if ctrl key is not pressed
Here is part of my code :
case sf::Event::MouseWheelMoved:
{
if(sf::Mouse::HorizontalWheel)
{
int8_t delta = event.mouseWheel.delta;
std::cout << "wheel movement: " << delta << std::endl;
for(uint16_t i=0; i<selected_chan.size() ;i++)
{
if(ch(selected_chan[i])get_channel_number()!=0)//si le circuit a ete cree
{
uint8_t res = 0;
uint8_t niv = ch(selected_chan[i]) get_level();
if(ch(selected_chan[i])get_mode()==false)
{
if(event.key.control)
{
cout << "control" << endl;
res = 2.55;
}
else
{
res = scroll_resolution*2.55;
}
thanks by advance for your answer