haxeui / haxeui-core

The core library of the HaxeUI framework
http://haxeui.org
MIT License
340 stars 70 forks source link

add mouse button option for drag scrolling #594

Closed inc0der closed 5 months ago

inc0der commented 5 months ago

Adds a property to ScrollView to allow choosing which mouse button can be used to drag scroll. I settled on scrollMouseButton after discussing it in Discord but if you like another option, please feel free to let me know and I'll change it.

ianharrigan commented 5 months ago

Alright, you know what, i think scrollMouseButton is the best its gonna get... so it'll be fine... one quick change though, instead of creating a whole new behaviour for it can we just do:

@:clonable @:behaviour(DefaultBehaviour, MouseButton.LEFT) public var scrollMouseButton:MouseButton;

(and remove the behaviour class) for simple things like this, a whole behaviour class isnt needed, default should be just fine.

inc0der commented 5 months ago

Ok perfect. I changed it to a DefaultBehaviour and removed the DataBehaviour class.

ianharrigan commented 5 months ago

Thanks!