[0.10.6][slpwnd] Mouse buttons not working over gui
[0.10.6][slpwnd] Mouse buttons not working over gui
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).
Re: [0.10.6] Mouse buttons still not working properly over g
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.
Re: [0.10.6] Mouse buttons still not working properly over g
Just to be sure, the problem is, that the pickup item from ground action don't work when the mouse is over gui?
Re: [0.10.6] Mouse buttons still not working properly over g
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.
I have MB4 pick up item, MB5 shoot, scroll wheel zoom in/out.
Re: [0.10.6] Mouse buttons still not working properly over g
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.
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.
Re: [0.10.6] Mouse buttons still not working properly over g
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
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
Re: [0.10.6] Mouse buttons still not working properly over g
Maybe it is good that you are not a programmer This is a nice and elegant solution indeed.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
Re: [0.10.6][slpwnd] Mouse buttons not working over gui
The suggested solution by @boro has been implemented and so this should be fixed for the 0.10.9.
Re: [0.10.6][slpwnd] Mouse buttons not working over gui
You guys know you're awesome right?
Re: [0.10.6][slpwnd] Mouse buttons not working over gui
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
Re: [0.10.6][slpwnd] Mouse buttons not working over gui
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.
Re: [0.10.6][slpwnd] Mouse buttons not working over gui
If the related bug still happens in 0.10.10, then please open a new bug report for it.