[0.10.6][slpwnd] Mouse buttons not working over gui

This subforum contains all the issues which we already resolved.
Post Reply
boro
Fast Inserter
Fast Inserter
Posts: 137
Joined: Thu May 22, 2014 5:36 pm
Contact:

[0.10.6][slpwnd] Mouse buttons not working over gui

Post by boro »

The mouse buttons/scroll wheel still don't work when the mouse cursor is over part of the GUI. This was supposedly fixed in 10.4 (I skipped 10.4 and 10.5, don't know if it temporarily worked).

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.10.6] Mouse buttons still not working properly over g

Post by Rseding91 »

A little more information + a screenshot and code if you're referring to a mod would be very helpful.
If you want to get ahold of me I'm almost always on Discord.


kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.10.6] Mouse buttons still not working properly over g

Post by kovarex »

Just to be sure, the problem is, that the pickup item from ground action don't work when the mouse is over gui?

boro
Fast Inserter
Fast Inserter
Posts: 137
Joined: Thu May 22, 2014 5:36 pm
Contact:

Re: [0.10.6] Mouse buttons still not working properly over g

Post by boro »

Anything binded to mouse buttons 4,5,scroll wheel doesn't work when the mouse pointer is over the gui.
I have MB4 pick up item, MB5 shoot, scroll wheel zoom in/out.

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [0.10.6] Mouse buttons still not working properly over g

Post by slpwnd »

The scroll will be fixed in the 0.10.7. The mouse buttons are more tricky.

The problem comes when you use the same key combination for some gui manipulation and for the game action. For instance you have mb4 for shooting but also for "shift clicking" the resources to inventory. This would mean that everytime you want to "shift click" the resources you would actually shoot instead. This is a technical problem as the gui should process the events first since it is in a "higher layer" but it is technically quite a lot of work - it would require a major rewrites in our gui library.

For now we could do a workaround that for instance mouse buttons 4 and 5 are resolved even when on top of the gui (because they are not used so often I guess). Though I am a bit afraid that this will just trigger bug reports of a kind mentioned in the previous paragraph.

boro
Fast Inserter
Fast Inserter
Posts: 137
Joined: Thu May 22, 2014 5:36 pm
Contact:

Re: [0.10.6] Mouse buttons still not working properly over g

Post by boro »

I'm not a programmer but could a check "if key is also bound to interface action" solve it?

So that if mouse button is bound to interface action and game action, or only interface action it does interface action.
If only bound to game action it does game action.

Something like that :)

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [0.10.6] Mouse buttons still not working properly over g

Post by slpwnd »

boro wrote:I'm not a programmer but could a check "if key is also bound to interface action" solve it?

So that if mouse button is bound to interface action and game action, or only interface action it does interface action.
If only bound to game action it does game action.

Something like that :)
Maybe it is good that you are not a programmer :D This is a nice and elegant solution indeed.

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [0.10.6][slpwnd] Mouse buttons not working over gui

Post by slpwnd »

The suggested solution by @boro has been implemented and so this should be fixed for the 0.10.9.

boro
Fast Inserter
Fast Inserter
Posts: 137
Joined: Thu May 22, 2014 5:36 pm
Contact:

Re: [0.10.6][slpwnd] Mouse buttons not working over gui

Post by boro »

You guys know you're awesome right? :D

boro
Fast Inserter
Fast Inserter
Posts: 137
Joined: Thu May 22, 2014 5:36 pm
Contact:

Re: [0.10.6][slpwnd] Mouse buttons not working over gui

Post by boro »

With the 0.10.9 fix it's now working for the scroll wheel to zoom in/out but nothing changed for mouse buttons 4 and 5 :(

boro
Fast Inserter
Fast Inserter
Posts: 137
Joined: Thu May 22, 2014 5:36 pm
Contact:

Re: [0.10.6][slpwnd] Mouse buttons not working over gui

Post by boro »

Another related problem is that when you draw a square for the deconstruction planner, your square gets canceled as soon as the cursor touches the gui.

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: [0.10.6][slpwnd] Mouse buttons not working over gui

Post by cube »

If the related bug still happens in 0.10.10, then please open a new bug report for it.

Post Reply

Return to “Resolved Problems and Bugs”