Skip to content

Add clickThrough property to GuiWindow#2164

Closed
thecreare wants to merge 1 commit intoPixelGuys:masterfrom
thecreare:drop-through-crosshair
Closed

Add clickThrough property to GuiWindow#2164
thecreare wants to merge 1 commit intoPixelGuys:masterfrom
thecreare:drop-through-crosshair

Conversation

@thecreare
Copy link
Contributor

Allows windows to not sink clicks, fixes #2162
Should this also apply to the chat window?

@Argmaster
Copy link
Collaborator

So, I don't know if this was blessed by @IntegratedQuantum or not but I would like to point out that this is a workaround which special cases very specific behavior. Instead I think it should be implemented through storing windows and components in a tree hierarchy and doing an event (as in event propagation (as in propagation ) through them to have a robust solution that won't require changes the second we want movement to be possible when UI is open or to stop character from shifting when text input is active.

Copy link
Member

@IntegratedQuantum IntegratedQuantum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling all inputs is not going to work since that makes it impossible to scale/move the crosshair (and all other windows, please think of the debug windows too).

As @Argmaster pointed out we need better event handling, events are already propagated through the tree, we just need a way to know whether the event was handled or not (see also #2144), if it wasn't handled then it should go on.

To fix the crosshair you then also just need to consult the hasBackground property.

@IntegratedQuantum
Copy link
Member

I have made a more robust implementation, based on what @Argmaster suggested, in #2511

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Can't drop items through crosshair

3 participants