View Issue Details

IDProjectCategoryView StatusLast Update
0006194Spring engineGeneralpublic2019-04-04 22:38
ReporterFloris Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionno change required 
Summary0006194: request: way to disable area selection
DescriptionThere is a widget we use called "smart select" that gradually selects units within the select rectangle. It also filters out some units, but when you 'execute' the selection, spring will still select all units within the selection rectangle. Resulting in the following selection 'glitch' effect seen in https://www.youtube.com/watch?v=JVLLUYLXS2k

please enlighten me how i can do away with this 'glitch'
TagsNo tags attached.
Checked infolog.txt for ErrorsIrrelevant

Activities

Google_Frog

2019-04-04 02:30

reporter   ~0019909

Use widget:SelectionChanged to modify the selection before the rest of luaUI hears about it. I'm not sure if it exists outside of the ZK widget handler, but you should be able to do something with UpdateSelection.

https://github.com/ZeroK-RTS/Zero-K/blob/master/LuaUI/cawidgets.lua#L2309

Floris

2019-04-04 13:05

reporter   ~0019910

Yes i coincidentally have implemented that over a few days ago...

i didn't see how smart select could communicate with the widget handler to determine when to block a selection. So instead i made all widgets that use selections look at the smart select widget instead if a select has to be ignored.

Google_Frog

2019-04-04 14:17

reporter   ~0019911

Widgets are called in layer-order for widget:SelectionChanged. Just make smart select called before the other selection widgets and it should all work out.

Floris

2019-04-04 17:33

reporter   ~0019912

thnx, it works!

Issue History

Date Modified Username Field Change
2019-04-03 23:42 Floris New Issue
2019-04-04 02:30 Google_Frog Note Added: 0019909
2019-04-04 13:05 Floris Note Added: 0019910
2019-04-04 14:17 Google_Frog Note Added: 0019911
2019-04-04 17:33 Floris Note Added: 0019912
2019-04-04 22:38 Kloot Status new => closed
2019-04-04 22:38 Kloot Resolution open => no change required