I have a button that needs to repeat a certain function only if it is currently getting held down by left-clicking.
Assuming buttonexample is a DButton, the example here:
buttonexample.DoClick = function() print("BUTTON WAS CLICKED") end
Only works once-when you left-click the button. I’d like it to KEEP repeating until the button is released, but only have the repeating of this function run if the button was left-clicked, not right clicked… How would I do this?
What I’m doing now-
buttonexample.Paint = function( self, w, h ) //Painting code snipped if self:IsDown() then print("BUTTON WAS CLICKED") end
Works fine, but even if you RIGHT-CLICK the button and hold. I don’t want to completely disable right-clicking the button, I just want right-clicking and holding to print something else (with my actual code, it performs a different function).