[Kde-games-devel] A new highscore manager - KScoreManager

Matt Williams matt at milliams.com
Tue Apr 29 23:37:07 CEST 2008


On Tuesday 29 April 2008 22:34:44 Matt Williams wrote:
> On Tuesday 29 April 2008 22:25:43 Mauricio Piacentini wrote:
> > Matt Williams wrote:
> > > Thanks a lot for your input, my brain had really hit a dead-end with
> > > this for a while.
> >
> > Just to deadlock your brain a little bit more :)
> > I do not think we should overengineer the thing, at least in the sense
> > of the external API for the games. Things should be really simple for
> > game authors, more or less like they are now with KScoreDialog:
> >
> > a) create the object
> > b) set some options (preferrably with one or two lines only)
> > c) display with one call, or get the widget to embed in your canvas
> >
> > The dialog/widget should handle capturing the username and other stuff,
> > without going through the app for this, imo.
>
> I agree and I'm really trying to keep the API lean for the enduser. The
> plan is that all the signals, slots, getters and bools that Parker's
> suggesting will be handled entirely by the UI class and so the game will
> not need to know anything about it. Such that:
>
> KScoreManager::self()->addScore(playerScore)
> new scoreDialog( KScoreManager::self() )->show();

Of course I meant

KScoreManager::self()->addScore(playerScore);
KScoreDialog scoreDialog( KScoreManager::self() );
scoreDialog.show();

Matt


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20080429/bbabee82/attachment.pgp 


More information about the kde-games-devel mailing list