Trap the mouse cursor inside the playable area
ClosedPublic

Authored by aacid on Feb 26 2020, 10:58 PM.

Details

Summary

BUGS: 418064

Diff Detail

Repository
R393 KBreakout
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
aacid created this revision.Feb 26 2020, 10:58 PM
Restricted Application added a reviewer: KDE Games. · View Herald TranscriptFeb 26 2020, 10:58 PM
Restricted Application added a subscriber: kde-games-devel. · View Herald Transcript
aacid requested review of this revision.Feb 26 2020, 10:58 PM
aacid planned changes to this revision.Feb 26 2020, 10:59 PM

Need to trap vertically too

aacid updated this revision to Diff 76500.Feb 26 2020, 11:31 PM

make it a bit more robust

aacid updated this revision to Diff 76501.Feb 26 2020, 11:35 PM
aacid retitled this revision from trap the mouse cursor inside the playable area to Trap the mouse cursor inside the playable area.
aacid edited the summary of this revision. (Show Details)
aacid removed a subscriber: helfferich.

edit commit log

Works as expected when playing the game.

However, when you lose the game and start over again it becomes to be a hard task to move the mouse pointer from the KBreakOut window or even reach the menu.

aacid added a comment.Feb 29 2020, 8:54 AM

You're right, i'll make it so that the jail doesn't work if you're not playing

aacid updated this revision to Diff 76969.Mar 4 2020, 9:54 PM

make it only force jail if the ball is moving

aacid added a comment.Mar 4 2020, 9:55 PM

make it only force jail if the ball is moving

Done.

The review is still against 19.12 even if it's too late now, so when approved i'll just land it against master

yurchor accepted this revision.Mar 4 2020, 10:01 PM

Tested to work as expected. Thanks!

This revision is now accepted and ready to land.Mar 4 2020, 10:01 PM
This revision was automatically updated to reflect the committed changes.