Thank you for the patch.
When you change level, the taken pieces are not resetted.
movesNum++ should be on the next line, it's quite easy to miss it after the '}'
|1 ↗||(On Diff #47353)|
neded to change filename and the year 2 lines below.
|22 ↗||(On Diff #47353)|
Video link to the current feature: https://drive.google.com/open?id=1tvJRkIz9GiBIzPX0oWetqt1FuOj36EkY
I'm still not sure what is the best way to present the pieces but the main code to store them is present on this patch, shouldn't be too complicated to switch to another view if needed :)
Nice patch :)
However it would be much better to have a button opening a pop-up to show them full-screen rather than on the sides like that.
We can have the button on the right side/under (depending on the view) of the undo button, with a label "taken" for example.
We lose the keyboard focus when the drawers open (ctrl+F, escape to leave the activity... all the shortcuts).
Another issue using 2 Drawer is that we need to click twice to return back to the game.
Do you think we can have another way to display them with only one click to go back to the game?
|26 ↗||(On Diff #47463)|
It will be really nice to have when we upgrade the minimal version of Qt but for now, it is Qt5.6 and Drawer has been added in Qt5.7 (https://doc.qt.io/qt-5.11/qml-qtquick-controls2-drawer.html).
|26 ↗||(On Diff #47463)|
I used Rectangle with animation. Thus we don't lose the keyboard focus. we don't need to remove list to play the game. Thus the user can leave it open while playing the game
There are still some issues with overriding when reducing the size screen.
As Timothée will rework the activity later (replace the texts with icons, better layout), it may be better to let him integrate the feature and fix these overriding if you prefer?
Else feel free to continue :)
@timotheegiet what do you think we can do for the layout?
Do you have an idea for a potential button to set as "display the taken pieces"?
Then, I would suggest a single line/column with all taken pieces (separated by colors), that should take less room as it would be nice to still have the board displayed.
Else, having a pop up that fills the whole screen should do it
Like I said in previous comment, I'd like to have the list of taken pieces in a separate pop-up view.
For this I would add a new button with a new icon (here is a proposal).
Clicking the button opens a pop-up with a title "Captured pieces", and below two rectangles dividing the page (horizontally or vertically depending on the orientation), one for white pieces and the other for black pieces.
If one of the rectangles is empty, maybe display a message "No piece captured" in it (though that is not mandatory).
I'm planning to do it (except if you have "more" time). I already switched to add the button and the action in it, "there is just" to do the pop-up, I can provide the diff (let's discuss this tonight on irc directly).