T7614 Memory games patch
Needs ReviewPublic

Authored by harrymecwan on Jan 17 2018, 10:57 AM.

Details

Summary

This patch does two things :-

  1. Create simple rectangle to display player name ("Tux" and "you" for 2 player and "score" for 1 player) and score number. This was suggested by Animtim (irc) because he wanted to do something about it later but for now this is what he suggested.
  2. In vertical mode the player name goes away and only the score number is left as to not get hidden by the bar.

screenshot : https://cdn.pbrd.co/images/H3bWJlF.png

Diff Detail

Repository
R2 GCompris
Lint
Lint Skipped
Unit
Unit Tests Skipped
harrymecwan created this revision.Jan 17 2018, 10:57 AM
Restricted Application added a project: KDE Edu. · View Herald TranscriptJan 17 2018, 10:57 AM
Restricted Application added a subscriber: KDE Edu. · View Herald Transcript
harrymecwan requested review of this revision.Jan 17 2018, 10:57 AM

Hi,
have you checked the border line cases?
Regarding the display itself, it would be better to check with Animtim on irc if we keep this or if we use the existing ScoreItem in core.

src/activities/memory/MemoryCommon.qml
167

qsTr() needed to translate string.
You can also use arg to have a better localisation.

167

you don't display anything on horizontal mode?

190

if the text is longer (because in another language, it has more characters), is the text contained in the rectangle or does it override?

This comment was removed by harrymecwan.
src/activities/memory/MemoryCommon.qml
167

on Horizontal mode i display either "You" or "Score" and the score depending on whether it is 2 player or not.
on vertical mode it displays only the score.
i have attached the screenshot for that.
https://cdn.pbrd.co/images/H3bWJlF.png

190

it does not. i'll fix that. :)

Creates simple rectangle to display player's and tux's scores for vertical mode only as suggested by @Animtim for a quick patch.
He said many activities have the same problem and he would come up with a general solution for this later until then patching it this way.

It's really weird to have a change of score display when entering/leaving vertical mode.
I'm not sure it's a good idea to have it, we need to discuss it more

harrymecwan marked an inline comment as done.Jan 31 2018, 1:15 PM

Yeah, Absolutely. It is weird. It needs to be discussed to get a general solution.