comparison Applications/Samples/WebAssembly/RtViewer/RtViewerWasm.cpp @ 1897:144f8f82c15a

added ctrl key in RtViewerWasm
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 26 Jan 2022 17:28:47 +0100
parents 7053b8a0aaec
children 1cfd602de69d
comparison
equal deleted inserted replaced
1896:b3c08e607d9f 1897:144f8f82c15a
78 { 78 {
79 RtViewerView* that = reinterpret_cast<RtViewerView*>(userData); 79 RtViewerView* that = reinterpret_cast<RtViewerView*>(userData);
80 80
81 int delta = 0; 81 int delta = 0;
82 if (wheelEvent->deltaY < 0) 82 if (wheelEvent->deltaY < 0)
83 {
83 delta = -1; 84 delta = -1;
84 if (wheelEvent->deltaY > 0) 85 }
86 else if (wheelEvent->deltaY > 0)
87 {
85 delta = 1; 88 delta = 1;
89 }
90
91 if (wheelEvent->mouse.ctrlKey)
92 {
93 delta *= 10;
94 }
86 95
87 that->Scroll(delta); 96 that->Scroll(delta);
88 97
89 return 1; 98 return 1;
90 } 99 }