Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top