View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0003879 | Spring engine | Lua | public | 2013-07-03 21:45 | 2017-08-21 16:26 | ||||
Reporter | PepeAmpere | ||||||||
Assigned To | |||||||||
Priority | high | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | no change required | ||||||
Product Version | 94.1.1+git | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0003879: widget:MouseRelease() callin standalone | ||||||||
Description | Its not possible to catch callins of widget:MouseRelease without use of widget:MousePress at the same time in the same widget - which eats the MousePress callin for rest of the game. Why is MouseRelease dependable on use of MousePress, but KeyRelease doesnt depend on KeyPress? Is it some speedup/optimalization? I would like to let it work like the KeyPress/Release. I think i can uderstand the duality (dependance) of callings, but i dont uderstand the blockade of callin for other widgets. I think its normal situation that there are more widgets reacting on the same event. Why it is not possible here? | ||||||||
Steps To Reproduce | function widget:MousePress() Spring.Echo("Imma pressed!") return true end function widget:MouseRelease() Spring.Echo("Imma released!") end | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
jK (developer) 2013-07-04 00:32 |
when you press a button on a GUI you don't want that e.g. custom formations gives units a command on the worldpos behind that button |
PepeAmpere (reporter) 2013-07-04 02:32 |
Thx for response. Yes, i understand this - the option to catch the callin for rest of the widgets, but theres no way how to use MouseRelease without this option used. Do you plan to make MousePress/MouseRelease similar to KeyPress/KeyRelease? Is there any problem to do it this way? |
PepeAmpere (reporter) 2013-07-04 02:46 Last edited: 2013-07-04 02:47 |
Btw I need it for this application: Im interested in list of units under selection just in the moment player Release the mouse button when area-selecting units. My idea was to use: widget:MouseRelease() + Spring.GetSelectedUnits I want to use this units list at least in two or three new widgets. |
jK (developer) 2013-07-05 07:17 |
saying it the x'ed time: you are doing it wrong rethink it again with what I said and what it means for you and maybe you will see where your logic error is |
PepeAmpere (reporter) 2013-07-07 20:15 |
jk, my idea doesnt kill the ability to use it the way you described in example. There still can be an option to avoid clicks on GUI (not much different from current one), but with current setup im not able to use MouseRelease. All my responses takes in consideration what you said. I still see no problem, maybe your counterexample was not described enough. |
sprung (reporter) 2017-06-21 16:23 |
This is doable as-is. The default widget handler only allows 1 widget to receive the callin but a game has control over its WH and can rewrite mouse event handling. |
PepeAmpere (reporter) 2017-08-21 16:22 |
Ok, this answer makes sense for me. I didn't know I can completely change exactly this in WH. |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2013-07-03 21:45 | PepeAmpere | New Issue | |
2013-07-04 00:32 | jK | Note Added: 0010957 | |
2013-07-04 02:32 | PepeAmpere | Note Added: 0010958 | |
2013-07-04 02:46 | PepeAmpere | Note Added: 0010959 | |
2013-07-04 02:47 | PepeAmpere | Note Edited: 0010959 | View Revisions |
2013-07-05 07:17 | jK | Note Added: 0010966 | |
2013-07-05 20:32 | abma | Severity | block => minor |
2013-07-07 20:15 | PepeAmpere | Note Added: 0010986 | |
2017-06-21 16:23 | sprung | Note Added: 0017856 | |
2017-08-21 16:22 | PepeAmpere | Note Added: 0018235 | |
2017-08-21 16:26 | Kloot | Status | new => closed |
2017-08-21 16:26 | Kloot | Resolution | open => no change required |