TURTLE: MouseWheel IE support

git-svn-id: svn://ultimatepp.org/upp/trunk@6893 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-02-10 08:49:10 +00:00
parent dfc152434a
commit b3ba3c25ff
2 changed files with 5 additions and 3 deletions

View file

@ -40,6 +40,8 @@ int64 Ctrl::recieved_update_serial;
Callback2<int, String> Ctrl::WhenConnect;
Callback1<int> Ctrl::WhenTerminate;
StaticRect& DesktopRect();
bool Ctrl::StartSession()
{
LLOG("Connect");
@ -131,8 +133,6 @@ bool Ctrl::StartSession()
#endif
ChStdSkin();
extern StaticRect& DesktopRect();
DesktopRect().Color(Cyan());
DesktopRect().SetRect(0, 0, DesktopSize.cx, DesktopSize.cy);
SetDesktop(Desktop());

View file

@ -471,11 +471,13 @@ canvas.onmouseup = function(event)
event.preventDefault();
}
canvas.onwheel = function(event)
function MouseWheel(event)
{
event_queue += "W " + event.deltaY + mouse_event(event);
}
canvas.addEventListener("wheel", MouseWheel); // IE9 needs addEventListener...
document.onkeydown = function(event)
{
event_queue += "K " + event.keyCode + " " + event.which + key_flags(event);