[Kde-games-devel] Review Request 126200: Deactivate pause button when no game is running. Fixes bug #264088
Julian Helfferich
julian.helfferich at googlemail.com
Thu Dec 17 02:29:36 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126200/
-----------------------------------------------------------
(Updated Dec. 17, 2015, 2:29 a.m.)
Status
------
This change has been marked as submitted.
Review request for KDE Games.
Changes
-------
Submitted with commit 6879ab00fbbda433174bb3fa8b8de8bcc7c950a8 by Julian Helfferich to branch master.
Bugs: 264088
http://bugs.kde.org/show_bug.cgi?id=264088
Repository: kblocks
Description
-------
Until now, the pause button can be pressed, even when no game is running. This can lead to unwanted effects. For example, sometimes the player has to press the pause button twice to pause the game. You can recreate this behavior following these steps:
* Open KBlocks
* Press the pause button (Button is pressed, no game running)
* Start a new game (Button is pressed, game is running)
* Press pause button (Button is released, game continues to run)
* Press pause button again (Button is pressed, game is paused)
This fix does the following:
* The pause button is disabled on startup.
* The button is activated when the game is started and set to "not pressed" (unchecked).
* If the pause button is pressed, but no game is running, then the button is disabled.
The last point means that the button is not disabled when a game is finished. This is because the information that the game finished is not communicated. In order to do this, it would be necessary to make KBlocksGameLogic and KBlocksSingleGame QObjects and create a Signal/Slot connection. Does anyone have an anlternative idea? Or knows a better way to do this?
Diffs
-----
KBlocksWin.cpp ca8139e
Diff: https://git.reviewboard.kde.org/r/126200/diff/
Testing
-------
* Confirmed that the pause button is disabled on startup.
* Pressed (disabled) pause button before game is started.
* Started, paused & resumed game.
* Started new game while game was either paused, running or finished.
* Paused & resumed new game.
* Pressed pause after game finished.
Thanks,
Julian Helfferich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20151217/aba163cc/attachment.html>
More information about the kde-games-devel
mailing list