mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
TURTLE: MouseWheel IE support
git-svn-id: svn://ultimatepp.org/upp/trunk@6893 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
dfc152434a
commit
b3ba3c25ff
2 changed files with 5 additions and 3 deletions
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue