News about KScoreDialog

Last days I’ve implemented hightscores in KSpiral. But I need a separate hightscore for each level and this isn’t provided by the KScoreDialog. So I patched the dialog.

KScoreDialog with level selection

KScoreDialog with level selection

The image above shows the new KScoreDialog in action. If you want to add a hightscore, you can write: dialog->setLevelName(qMakePair(untranslatedName, translatedName));. Now, the hightscore is saved in the group [KHightScore_Difficulty_MAP:untranslatedName].

To read the hightscore information you have to add the levels you want to show with: dialog->addLocalizedLevelName(qMakePair(..., ...));. It’s also possible to add more then one level at once with addLocalizedLevelNames(QMap(...));.

If you call neither call „addLocalizedLevel{Name,Names}“ nor „setLevelName“ you get the old KScoreDialog (for backward compatibility).

Now I need your point of view. Please look the patch over.

Advertisements

10 Kommentare (+deinen hinzufügen?)

  1. tadeusz
    Okt 01, 2009 @ 20:20:14

    Cool. Quite an improvement. Magazynier (ksokoban replacement in playground) features levels and level packs. I think I can use the tabs on the left for level packs and the drop down menu for the levels.

    Antwort

    • hobbyblobby
      Okt 01, 2009 @ 21:48:34

      I’m pleased about your comment. Please report, when you try to use the new KScoreDialog. I’m allways open for your questions and suggestions.

      Antwort

  2. Fri13
    Okt 01, 2009 @ 21:21:04

    What I wait for all KDE games to have, is the date of score.

    The score lists usually ends to have only one players names there. But it is not nice to be without information when the score was done.

    Antwort

    • hobbyblobby
      Okt 01, 2009 @ 21:40:48

      There comes the question, how do realize that additional information. One the one Hand, its is easy to do: you can say addField(KScoreDialog::Custom1, "Date of hightscore", "Date");. Then the date is shown in an additional coloumn. On the other hand I can imagine for example a tool-tip thats shows the date. For this you need another patch for the score-dialog. Open for discussion…

      Regards, Felix

      Antwort

      • Fri13
        Okt 01, 2009 @ 22:26:38

        Well, I believe the tool-tip is better if wanted to maintain small screen support on all dialogs. The new column would take more space again. I believe I would take the new column.

        The tool-tip altought gives possibility to show clock time as well, the number of try (is it example the 54th time to play it) and some other small informations, without it taking space on the screen. But the arragement is not possible then for those. So you can not see easily what try was best all the times.

        Antwort

        • hobbyblobby
          Okt 01, 2009 @ 22:52:02

          Nive idea, but this has nothing to do with my patch. I think, you should post your proposal at the kde-games-devel mailing list.

          In the past, there was also an discussion about a new scoresystem. In playgroundgames you can find a scoremanager, but I don’t know, in wich state is it.

          Antwort

  3. Darryl
    Okt 02, 2009 @ 04:03:42

    Good job, but IMHO the tabs would look better without sideways text – so KDE3. Maybe make the tabs going horizontally across? Thanks for your work!

    Antwort

    • hobbyblobby
      Okt 02, 2009 @ 11:30:49

      That is a point that can be discussed on the kde-games-devel mailing list. In my opinion the tabwidget on the left is a good solution. If you highscores in 5 different difficulties the tabbar can be quite wide. But the table is more height then wide.

      Antwort

  4. myselfhimself
    Okt 02, 2009 @ 23:00:58

    what about syncing with online high scores ?
    see with frank karlitschek ; he’ll be able to help with that likely.

    Antwort

    • hobbyblobby
      Okt 03, 2009 @ 16:25:23

      In the moment it is more or less a hack to get the level selection working. Some features like online syncing can be involved in the new score system. xStefan and I are in discussion about the new ways. Please talk together with us on the kde-games-devel mailing list.

      Antwort

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s

CC-License

Creative Commons Lizenzvertrag
Dieser Werk bzw. Inhalt ist unter einer Creative Commons-Lizenz lizenziert.

Paperblog :Die besten Artikel aus Blogs

Old but important:

Um neue Beiträge per E-Mail zu erhalten, hier die E-Mail-Adresse eingeben.

Schließe dich 2 Followern an