Opened 7 years ago

Last modified 3 years ago

#4741 new defect

Use a larger double-click radius

Reported by: temple Owned by:
Priority: Should Have Milestone: Backlog
Component: UI – In-game Keywords:
Cc: Patch:

Description (last modified by temple)

Currently double-clicks in session are only registered if the distance between clicks is at most one pixel in each direction. It would be nice if this was a little larger.

See the discussion starting here https://code.wildfiregames.com/D326#31781

The lobby and replay menu use a different double-click detection, which doesn't use pixel distance. (See "mouseleftdoubleclickitem" in CList.cpp.)

See also #4414.

Change History (4)

comment:1 by temple, 7 years ago

Description: modified (diff)

comment:2 by elexis, 7 years ago

CList.cpp also uses a hardcoded duration between two clicks.

The mouseleftdoubleclickitem event had been added because one click on an item at the top and another hundreds of pixels lower had also triggered the doubleclick event.

So IMO CList.cpp should have the hardcoded detection removed as well and we should fix SDL as proposed by causative in D326.

if (timer_Time() - m_LastItemClickTime < SELECT_DBLCLICK_RATE && hovered == m_PrevSelectedItem)

(Imagine that the various hardcodings across the JS and C++ GUI all need tweaking for different users.)

Alternatively if its completely out of reach to fix SDL (shouldn't be, as it's only adding a getter/setter), then we could at least at config values and use the same duration and pixel distance throughout the code.

comment:3 by Imarok, 5 years ago

Component: UI & SimulationIn-game UI

Move tickets to In-game UI as UI & Simulation got some sub components.

comment:4 by wraitii, 3 years ago

Guess what, SDL now allows that... On some platforms: Phab:rP24698

This seems somewhat contradictory with #5920, but maybe we should explicitly treat clicking a different entity as not a double-click, which I suppose is a partial revert of https://code.wildfiregames.com/D326#31781

Note: See TracTickets for help on using tickets.