Widgets should be able to react on mouse-over
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Millennium Duel |
Fix Released
|
Medium
|
Rafał Cieślak |
Bug Description
A lot of widgets might want to react when mouse pointer touches them. For example, buttons might want to change their color in such case, other widgets may display additional options when touched.
That means we'll need to listen for one more event in the main loop. Handling this will be similar to clicks, coordinates need to be processed recursively.
Widgets have to be notified when mouse pointer enters the area of the widget, *and when it leaves it* (so that the button would change it's bg color to normal back again). There are several equally good ways to accomplish this, one of ideas is as follows:
- Each time the currently untouched widget is touched, previously touched one should be found and told it is no longer touched.
- Containers that contain a touched widget are, themselves, also touched. That means whenever a container recognizes that a mouse is now over a new children that wasn't touched in last mouse' position, it should find which of it's children was touched before, tell it it's no longer touched, and it should recursively unmark all it's children. Then the parent widget passes the mouse-over event to the appropriate child.
summary: |
- Widgets are unable to react on mouse-over + Widgets should be able to react on mouse-over |
Changed in millenniumduel: | |
assignee: | nobody → Rafał Cieślak (rafalcieslak256) |
status: | New → In Progress |
Changed in millenniumduel: | |
status: | In Progress → Fix Committed |
Changed in millenniumduel: | |
status: | Fix Committed → Fix Released |