You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Not sure exactly what is going on but I am trying to stop clicks going through to SliderView in TGD. This approach seems to work for other views.
I tried looking at gui.cs\UnitTests\Views\SliderTests.cs` for mouse tests but couldn't see any to adapt for repro.
if(subView.GetType().IsGenericType(typeof(Slider<>))){// TODO: Does not seem to worksubView.MouseEvent+=(s,e)=>SuppressNativeClickEvents(s,e,true);subView.MouseClick+=(s,e)=>SuppressNativeClickEvents(s,e,true);}
...
private void SuppressNativeClickEvents(object?sender,MouseEventEventArgsobj,boolalsoSuppressClick= false){if(alsoSuppressClick){obj.Handled=true;}else{// Suppress everything except single click (selection)obj.Handled=obj.MouseEvent.Flags!=MouseFlags.Button1Clicked;}}