I’m trying to create my own kind of rotary slider component that displays a text box when you right click on it, though I’m struggling to figure out the best way of going about doing this. The two methods I’ve tried so far that, as far as I can understand, will not work are:
Create a class that inherits from slider and override it’s mouseDown/mouseUp etc functions to create the ‘right-click’ functionality, however this will disable the slider’s mouse responses. Would there be anyway to signify within my mouseDown() function to instead call the sliders mouseDown() function if, say, the mouseEvent isn’t a right click? Or is that kind of thing not possible with C++ and inheritance?
Create a class that inherits from component, create a slider object within it, and override the components mouse event functions to create the ‘right-click’ functionality. However if the click is on the slider section of the component it will call the sliders mouse functions instead of the parent components.
Anyone got any ideas?