Adding a enableLabelClickthrough("label name") and disableLabelClickthrough("label name") would bring a number of advantages to UI design. One idea I had in mind was setting custom labels on top of the mapper (replacing the default room info option which you can't modify) while still having the label act like the room info option - so you can still click on things underneath.
It would also allow you to layer labels and for easier design and have the relevant one accept the clicks at the bottom.
Idea: clickthrough property in a label
Re: Idea: clickthrough property in a label
This is a great idea. I'd find this useful in a multitude of ways.
Re: Idea: clickthrough property in a label
And clickthru() would do what exactly?
Re: Idea: clickthrough property in a label
There wouldn't be such a function. Just a function to enable clickthrough (which is defined as not capturing the click event and passing it on) and disabling the property.
Re: Idea: clickthrough property in a label
I'm not sure if this is easily doable with Qt without 2 much work (i. e. essentially setting up a backend on our own to provide a label stacking order feature)
Re: Idea: clickthrough property in a label
I could be wrong, but I think that we already override the on click handler in labels to make function callbacks work - and from there we just return a value that says keep propagating.
Re: Idea: clickthrough property in a label
You can just add an enabled property to labels and toggle it. All that's needed is 3-4 lines of code. That's without a z ordering though, which may not be such a bad thing to implement as well.
Re: Idea: clickthrough property in a label
I wrote code for this months ago if I am interpreting this post correctly. Check out my timed warning labels post for a cool Growl-style stacking feature.
Re: Idea: clickthrough property in a label
It wouldn't accomplish the same goal. In essence, Vadi is saying if you have a label over the mapper, he would like the ability to 1) keep the label appear and 2) being able to double click/right click/etc a room.
- SlySven
- Posts: 1023
- Joined: Mon Mar 04, 2013 3:40 pm
- Location: Deepest Wiltshire, UK
- Discord: SlySven#2703
Re: Idea: clickthrough property in a label
Am I correct in thinking Qt would do this by having the Label's OnClick event handler either "accept"ing the event to handle it or "reject"ing it to pass it on through to the underlying mapper widget? Would the Z-ordering be OK if labels are all drawn after the rooms/exits/custom-lines or is it more magical than that? Is this only intended for the 2D mapper or do we eventually envisage adding label and other functionality to the 3D one?