[Kde-games-devel] Review Request 126200: Deactivate pause button when no game is running. Fixes bug #264088
Frederik Schwarzer
schwarzer at kde.org
Wed Dec 16 11:24:58 UTC 2015
> On Dec. 6, 2015, 7:15 a.m., Frederik Schwarzer wrote:
> > I can see nothing wrong with a signal/slot connection. I saw several games doing it like that.
> >
> > Having a method (isPaused()) in the game class and ask from the app class at certain points might also work but seems less clean to me.
> >
> > Your current patch already fixes some issues so for me it is fine to commit it. But wait a few days for others to comment. :)
>
> Julian Helfferich wrote:
> Thank you for the feedback.
>
> If there are no objections, I will submit the patch at the end of this week and close the bug as fixed. In a second step, I will implement a signal/slot connection to disable the pause button when a game finishes.
>
> The 15.12 branch will be frozen tomorrow (15.12 tagging), but I can still commit to master, correct?
Ping?
- Frederik
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126200/#review89161
-----------------------------------------------------------
On Dec. 6, 2015, 1:53 a.m., Julian Helfferich wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126200/
> -----------------------------------------------------------
>
> (Updated Dec. 6, 2015, 1:53 a.m.)
>
>
> Review request for KDE Games.
>
>
> 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/20151216/aa8ed487/attachment.html>
More information about the kde-games-devel
mailing list