Merge lp:~brandontschaefer/unity/lp.982543-add-y-break-zone into lp:unity
Proposed by
Brandon Schaefer
Status: | Merged |
---|---|
Approved by: | Marco Trevisan (Treviño) |
Approved revision: | no longer in the source branch. |
Merged at revision: | 3157 |
Proposed branch: | lp:~brandontschaefer/unity/lp.982543-add-y-break-zone |
Merge into: | lp:unity |
Diff against target: |
107 lines (+60/-3) 3 files modified
launcher/EdgeBarrierController.cpp (+33/-3) launcher/EdgeBarrierControllerPrivate.h (+2/-0) tests/test_edge_barrier_controller.cpp (+25/-0) |
To merge this branch: | bzr merge lp:~brandontschaefer/unity/lp.982543-add-y-break-zone |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Marco Trevisan (Treviño) | Approve | ||
PS Jenkins bot | continuous-integration | Pending | |
Review via email: mp+148302@code.launchpad.net |
Commit message
Adds a Y break zone on the barrier so you can only break the barrier if pushing hard enough within this zone. Otherwise it resets the decay.
Description of the change
=== Problem ===
When moving against the barrier along the y axis, you can still break through the barrier. This can be annoying if you want to do something along the launcher.
=== Fix ===
Only allow the barriers to be broken if you are pushing up against the barrier in a small area of the Y axis. Right now it takes the event.y plus a 20 on both sides of the y axis. This gives 40 on the y axis to where you can break the barrier, if you move out of it, it resets the barrier decay to 0.
=== Tests ===
2 unit tests.
To post a comment you must log in.
It works as expected, thanks.
A nice addon could have been a new setting, but that's something that we don't really need a this point.