简体   繁体   中英

Using wheelDelta in onmousewheel event via Script#

I use mouse events in Script# with ElementEvent argument. But I can not find WheelDelta property in this argument for onmousewheel event. How is it possible to use this property?

I solved my problem by introducing following type and method (using Script# 0.7.5):

[Imported]
public static class Global
{
    [IntrinsicProperty, ScriptAlias("e.wheelDelta")]
    public static int WheelDelta
    {
        get { return 0; }
    }
}

And in onmousewheel event I just paste Global.WheelDelta where I wanna access to wheelDelta.

For more latest releases of Script# (>= 0.8) one should replace Imported with ScriptImport and IntrinsicProperty with ScriptField .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM