[Commits] [wesnoth/wesnoth] 315f84: Allow widget::find_at() to return a scrollbar cont...
GitHub
noreply at github.com
Tue Jun 6 19:36:46 UTC 2017
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 315f8496b61db8347b694e2efadfe6ff9ccc7702
https://github.com/wesnoth/wesnoth/commit/315f8496b61db8347b694e2efadfe6ff9ccc7702
Author: Jyrki Vesterinen <sandgtx at gmail.com>
Date: 2017-06-06 (Tue, 06 Jun 2017)
Changed paths:
M src/gui/core/event/dispatcher_private.hpp
M src/gui/widgets/scrollbar_container.cpp
Log Message:
-----------
Allow widget::find_at() to return a scrollbar container
If the pointer wasn't on top of any widget within a scrollbar container,
when GUI2 queried the widget on which a UI event occurred, the answer was
"no widget" and the whole event was discarded.
That was problematic if the player was trying to scroll. It is desired that
scrolling is possible even if the pointer isn't on a widget (as long as
it's somewhere within the scrollbar container).
Now the query will return "scrollbar container" and dispatch the event to
it. That allows the player to scroll anywhere within a scrollbar container.
Also, now the GUI2 event chain includes the target widget itself, not only
its ancestors.
Fixes #1632.
More information about the Commits
mailing list